react-eslint-standard 9.9.0 → 9.10.0

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.
Files changed (2) hide show
  1. package/dist/index.js +61 -80
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -8,91 +8,72 @@ import tseslint from 'typescript-eslint';
8
8
  import { tseslintRules } from 'typescript-eslint-standard';
9
9
 
10
10
  const reactRules = {
11
- 'react/jsx-uses-react': 'error',
12
- 'react/jsx-uses-vars': 'error',
11
+ 'react/jsx-uses-react': 'error',
12
+ 'react/jsx-uses-vars': 'error',
13
13
  };
14
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 ?? {};
25
- const inherits = inherit ?? [];
26
- return tseslint.config(
27
- eslint.configs.recommended,
28
- ...tseslint.configs.recommendedTypeChecked,
29
- ...tseslint.configs.strictTypeChecked,
30
- prettierConfig,
31
- prettierRecommended,
32
- ...inherits,
33
- {
34
- name: 'react-eslint-standard',
35
- files: files ?? ['**/*.{j,t}s', '**/*.m{j,t}s', '**/*.{j,t}sx'],
36
- languageOptions: languageOptions ?? {
37
- parser: tseslint.parser,
38
- globals: globals ?? {},
39
- parserOptions: {
40
- project: true,
41
- ecmaVersion: 'latest',
42
- sourceType: 'module',
43
- ecmaFeatures: {
44
- jsx: true,
45
- },
15
+ const { extends: inherit, files, ignores, languageOptions, plugins, rules, globals, settings, } = config ?? {};
16
+ const inherits = inherit ?? [];
17
+ return tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, ...tseslint.configs.strictTypeChecked, prettierConfig, prettierRecommended, ...inherits, {
18
+ name: 'react-eslint-standard',
19
+ files: files ?? ['**/*.{j,t}s', '**/*.m{j,t}s', '**/*.{j,t}sx'],
20
+ languageOptions: languageOptions ?? {
21
+ parser: tseslint.parser,
22
+ globals: globals ?? {},
23
+ parserOptions: {
24
+ project: true,
25
+ ecmaVersion: 'latest',
26
+ sourceType: 'module',
27
+ ecmaFeatures: {
28
+ jsx: true,
29
+ },
30
+ },
46
31
  },
47
- },
48
- plugins: {
49
- react,
50
- 'simple-import-sort': simpleImportSort,
51
- ...plugins,
52
- },
53
- rules: {
54
- ...tseslintRules,
55
- ...reactRules,
56
- ...rules,
57
- },
58
- ignores: ignores ?? [
59
- 'node_modules',
60
- 'dist',
61
- 'build',
62
- 'package.json',
63
- '**/*.md',
64
- ' **/*.svg',
65
- '**/*.ejs',
66
- '**/*.html',
67
- ],
68
- settings: settings ?? {},
69
- },
70
- {
71
- name: 'vitest-eslint-standard',
72
- files: ['**/*.{test,spec}.{j,t}s', '**/*.{test,spec}.{j,t}sx'],
73
- plugins: {
74
- vitest,
75
- },
76
- rules: {
77
- ...vitest.configs.recommended.rules,
78
- ...rules,
79
- },
80
- settings: {
81
- vitest: {
82
- typecheck: true,
32
+ plugins: {
33
+ react,
34
+ 'simple-import-sort': simpleImportSort,
35
+ ...plugins,
83
36
  },
84
- },
85
- languageOptions: {
86
- globals: {
87
- ...vitest.environments.env.globals,
37
+ rules: {
38
+ ...tseslintRules,
39
+ ...reactRules,
40
+ ...rules,
88
41
  },
89
- },
90
- },
91
- {
92
- files: ['**/*.js', '**/*.jsx'],
93
- ...tseslint.configs.disableTypeChecked,
94
- },
95
- );
42
+ ignores: ignores ?? [
43
+ 'node_modules',
44
+ 'dist',
45
+ 'build',
46
+ 'package.json',
47
+ '**/*.md',
48
+ ' **/*.svg',
49
+ '**/*.ejs',
50
+ '**/*.html',
51
+ ],
52
+ settings: settings ?? {},
53
+ }, {
54
+ name: 'vitest-eslint-standard',
55
+ files: ['**/*.{test,spec}.{j,t}s', '**/*.{test,spec}.{j,t}sx'],
56
+ plugins: {
57
+ vitest,
58
+ },
59
+ rules: {
60
+ ...vitest.configs.recommended.rules,
61
+ ...rules,
62
+ },
63
+ settings: {
64
+ vitest: {
65
+ typecheck: true,
66
+ },
67
+ },
68
+ languageOptions: {
69
+ globals: {
70
+ ...vitest.environments.env.globals,
71
+ },
72
+ },
73
+ }, {
74
+ files: ['**/*.js', '**/*.mjs', '**/*.jsx'],
75
+ ...tseslint.configs.disableTypeChecked,
76
+ });
96
77
  }
97
78
 
98
79
  export { defineConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-eslint-standard",
3
- "version": "9.9.0",
3
+ "version": "9.10.0",
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.37.2",
27
- "typescript-eslint-standard": "^9.20.0"
27
+ "typescript-eslint-standard": "^9.23.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@rollup/plugin-commonjs": "^28.0.1",
@@ -33,12 +33,12 @@
33
33
  "@rollup/plugin-replace": "^6.0.1",
34
34
  "@rollup/plugin-terser": "^0.4.4",
35
35
  "@rollup/plugin-typescript": "^12.1.1",
36
- "@types/node": "^22.8.7",
37
- "rollup": "^4.24.4",
36
+ "@types/node": "^22.9.0",
37
+ "rollup": "^4.27.2",
38
38
  "rollup-plugin-dts": "^6.1.1",
39
39
  "tslib": "^2.8.1",
40
40
  "typescript": "^5.6.3",
41
- "vitest": "^2.1.4"
41
+ "vitest": "^2.1.5"
42
42
  },
43
43
  "author": "mivui",
44
44
  "license": "MIT",