react-eslint-standard 9.0.9 → 9.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -9
- package/dist/index.d.ts +2 -4
- package/dist/index.js +11 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# ⚡react-eslint-standard
|
|
2
2
|
|
|
3
3
|
#### quickly start eslint in react.
|
|
4
|
+
|
|
4
5
|
[](https://www.npmjs.com/package/react-eslint-standard)
|
|
5
6
|
[](https://npmcharts.com/compare/react-eslint-standard?minimal=true)
|
|
6
7
|

|
|
7
8
|

|
|
8
9
|
|
|
9
|
-
|
|
10
10
|
### install
|
|
11
11
|
|
|
12
12
|
```shell
|
|
@@ -19,7 +19,6 @@ npm i react-eslint-standard -D
|
|
|
19
19
|
import { defineConfig } from 'react-eslint-standard';
|
|
20
20
|
|
|
21
21
|
export default defineConfig();
|
|
22
|
-
|
|
23
22
|
```
|
|
24
23
|
|
|
25
24
|
### .prettierrc.js
|
|
@@ -34,7 +33,6 @@ export default {
|
|
|
34
33
|
bracketSameLine: true,
|
|
35
34
|
endOfLine: 'auto',
|
|
36
35
|
};
|
|
37
|
-
|
|
38
36
|
```
|
|
39
37
|
|
|
40
38
|
### custom configuration
|
|
@@ -45,11 +43,9 @@ import tseslint from 'typescript-eslint';
|
|
|
45
43
|
|
|
46
44
|
export default defineConfig({
|
|
47
45
|
extends: [...tseslint.configs.recommended, ...tseslint.configs.strict],
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'@typescript-eslint/no-empty-interface': 'off',
|
|
52
|
-
},
|
|
46
|
+
rules: {
|
|
47
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
48
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
53
49
|
},
|
|
54
50
|
});
|
|
55
|
-
```
|
|
51
|
+
```
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { TSESLint } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
3
|
interface Config extends Omit<TSESLint.FlatConfig.Config, 'linterOptions' | 'name' | 'processor'> {
|
|
4
|
+
extends?: TSESLint.FlatConfig.Config[];
|
|
4
5
|
globals?: TSESLint.SharedConfig.GlobalsConfig;
|
|
5
6
|
}
|
|
6
|
-
declare function defineConfig(
|
|
7
|
-
extends?: TSESLint.FlatConfig.Config[];
|
|
8
|
-
config?: Config;
|
|
9
|
-
}): TSESLint.FlatConfig.ConfigArray;
|
|
7
|
+
declare function defineConfig(config?: Config): TSESLint.FlatConfig.ConfigArray;
|
|
10
8
|
|
|
11
9
|
export { type Config, defineConfig };
|
package/dist/index.js
CHANGED
|
@@ -11,9 +11,17 @@ const reactRules = {
|
|
|
11
11
|
'react/jsx-uses-react': 'error',
|
|
12
12
|
'react/jsx-uses-vars': 'error',
|
|
13
13
|
};
|
|
14
|
-
function defineConfig(
|
|
15
|
-
const {
|
|
16
|
-
|
|
14
|
+
function defineConfig(config) {
|
|
15
|
+
const {
|
|
16
|
+
extends: inherit,
|
|
17
|
+
files,
|
|
18
|
+
ignores,
|
|
19
|
+
languageOptions,
|
|
20
|
+
plugins,
|
|
21
|
+
rules,
|
|
22
|
+
globals,
|
|
23
|
+
settings,
|
|
24
|
+
} = config ?? {};
|
|
17
25
|
const inherits = inherit ?? [];
|
|
18
26
|
return tseslint.config(
|
|
19
27
|
eslint.configs.recommended,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-eslint-standard",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.11",
|
|
4
4
|
"description": "quickly start eslint in react",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"eslint-plugin-react": "^7.35.0",
|
|
27
|
-
"typescript-eslint-standard": "^9.0.
|
|
27
|
+
"typescript-eslint-standard": "^9.0.16"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@rollup/plugin-replace": "^5.0.7",
|
|
34
34
|
"@rollup/plugin-terser": "^0.4.4",
|
|
35
35
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
36
|
-
"@types/node": "^20.14.
|
|
37
|
-
"rollup": "^4.19.
|
|
36
|
+
"@types/node": "^20.14.13",
|
|
37
|
+
"rollup": "^4.19.2",
|
|
38
38
|
"rollup-plugin-dts": "^6.1.1",
|
|
39
39
|
"tslib": "^2.6.3",
|
|
40
40
|
"typescript": "^5.5.4",
|
|
41
41
|
"vite": "^5.3.5",
|
|
42
|
-
"vitest": "^2.0.
|
|
42
|
+
"vitest": "^2.0.5"
|
|
43
43
|
},
|
|
44
44
|
"author": "mivui",
|
|
45
45
|
"license": "MIT",
|