Skip to content

Commit 0997cf9

Browse files
authored
Merge pull request #559 from nygardk/maintenance
Deps & configs maintenance
2 parents e0cca69 + f16aff1 commit 0997cf9

16 files changed

+3004
-3010
lines changed

.changeset/big-otters-watch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-share": patch
3+
---
4+
5+
Build tooling updates. May affect the distributed files.

.changeset/tidy-apricots-burn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-share": patch
3+
---
4+
5+
Internal type fixes.

.eslintrc

Lines changed: 0 additions & 51 deletions
This file was deleted.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.9.0
1+
22.13.1

eslint.config.mjs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import js from "@eslint/js";
2+
import ts from "@typescript-eslint/eslint-plugin";
3+
import tsParser from "@typescript-eslint/parser";
4+
import react from "eslint-plugin-react";
5+
import reactHooks from "eslint-plugin-react-hooks";
6+
import jsxA11y from "eslint-plugin-jsx-a11y";
7+
import prettier from "eslint-plugin-prettier";
8+
import prettierConfig from "eslint-config-prettier";
9+
import globals from "globals";
10+
11+
export default [
12+
js.configs.recommended,
13+
{
14+
files: ["**/*.ts", "**/*.tsx"],
15+
languageOptions: {
16+
parser: tsParser,
17+
sourceType: "module",
18+
ecmaVersion: "latest",
19+
globals: {
20+
...globals.browser,
21+
...globals.node,
22+
},
23+
},
24+
plugins: { "@typescript-eslint": ts },
25+
rules: {
26+
...ts.configs.strict.rules,
27+
"@typescript-eslint/consistent-type-imports": [
28+
"error",
29+
{
30+
prefer: "type-imports",
31+
disallowTypeAnnotations: false,
32+
},
33+
],
34+
},
35+
},
36+
{
37+
files: ["**/*.jsx", "**/*.tsx"],
38+
plugins: {
39+
react,
40+
"react-hooks": reactHooks,
41+
"jsx-a11y": jsxA11y,
42+
},
43+
settings: { react: { version: "detect" } },
44+
rules: {
45+
...react.configs.recommended.rules,
46+
...reactHooks.configs.recommended.rules,
47+
...jsxA11y.configs.recommended.rules,
48+
"react/prop-types": "off",
49+
"react/react-in-jsx-scope": "off",
50+
},
51+
},
52+
{
53+
name: "Prettier",
54+
plugins: { prettier },
55+
rules: {
56+
...prettierConfig.rules,
57+
"prettier/prettier": "error",
58+
},
59+
},
60+
];

0 commit comments

Comments
 (0)