@st1ggy/linter-config 1.0.67 → 1.0.68
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/package.json +1 -1
- package/src/eslint/eslint.config.common.js +6 -6
- package/src/eslint/eslint.config.next.js +3 -16
- package/src/eslint/eslint.config.react.js +3 -3
- package/src/eslint/eslint.config.typescript.js +4 -4
- package/src/eslint/rules/rules.common.js +7 -3
- package/src/eslint/rules/rules.next.js +14 -0
- package/src/eslint/rules/rules.prettier.js +7 -3
- package/src/eslint/rules/rules.react.js +11 -4
- package/src/eslint/rules/rules.sonarjs.js +5 -1
- package/src/eslint/rules/rules.unicorn.js +7 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import commonConfig from './rules/rules.common.js'
|
|
2
|
+
import importConfig from './rules/rules.import.js'
|
|
3
|
+
import prettierConfig from './rules/rules.prettier.js'
|
|
4
|
+
import sonarjsConfig from './rules/rules.sonarjs.js'
|
|
5
|
+
import unicornConfig from './rules/rules.unicorn.js'
|
|
6
6
|
|
|
7
|
-
export default [...
|
|
7
|
+
export default [...prettierConfig, ...commonConfig, ...importConfig, ...unicornConfig, ...sonarjsConfig]
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import nextConfig from './eslint.config.next.js'
|
|
2
|
+
import reactConfig from './eslint.config.react.js'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default [
|
|
6
|
-
...react,
|
|
7
|
-
{
|
|
8
|
-
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
9
|
-
plugins: {
|
|
10
|
-
'@next/next': nextPlugin,
|
|
11
|
-
},
|
|
12
|
-
rules: {
|
|
13
|
-
...nextPlugin.configs.recommended.rules,
|
|
14
|
-
...nextPlugin.configs['core-web-vitals'].rules,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
]
|
|
4
|
+
export default [...reactConfig, ...nextConfig]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import typescriptConfig from './eslint.config.typescript.js'
|
|
2
|
+
import reactConfig from './rules/rules.react.js'
|
|
3
3
|
|
|
4
|
-
export default [...
|
|
4
|
+
export default [...typescriptConfig, ...reactConfig]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import tseslint from 'typescript-eslint'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import commonConfig from './eslint.config.common.js'
|
|
4
|
+
import typescriptConfig from './rules/rules.typescript.js'
|
|
5
5
|
|
|
6
6
|
export default tseslint.config(
|
|
7
|
-
...
|
|
7
|
+
...commonConfig,
|
|
8
8
|
...tseslint.configs.recommended,
|
|
9
9
|
...tseslint.configs.stylistic,
|
|
10
|
-
...
|
|
10
|
+
...typescriptConfig,
|
|
11
11
|
)
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import eslint from '@eslint/js'
|
|
2
|
+
import tseslint from 'typescript-eslint'
|
|
2
3
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
4
|
+
export default tseslint.config(
|
|
5
|
+
{
|
|
6
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
7
|
+
extends: eslint.configs.recommended,
|
|
8
|
+
},
|
|
5
9
|
{
|
|
6
10
|
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
7
11
|
rules: {
|
|
@@ -85,4 +89,4 @@ export default [
|
|
|
85
89
|
],
|
|
86
90
|
},
|
|
87
91
|
},
|
|
88
|
-
|
|
92
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import nextPlugin from '@next/eslint-plugin-next'
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
{
|
|
5
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
6
|
+
plugins: {
|
|
7
|
+
'@next/next': nextPlugin,
|
|
8
|
+
},
|
|
9
|
+
rules: {
|
|
10
|
+
...nextPlugin.configs.recommended.rules,
|
|
11
|
+
...nextPlugin.configs['core-web-vitals'].rules,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
]
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import prettierConfig from 'eslint-config-prettier'
|
|
2
2
|
import prettierPlugin from 'eslint-plugin-prettier'
|
|
3
|
+
import tseslint from 'typescript-eslint'
|
|
3
4
|
|
|
4
|
-
export default
|
|
5
|
-
|
|
5
|
+
export default tseslint.config(
|
|
6
|
+
{
|
|
7
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
8
|
+
extends: prettierConfig,
|
|
9
|
+
},
|
|
6
10
|
{
|
|
7
11
|
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
8
12
|
plugins: { prettier: prettierPlugin },
|
|
9
13
|
rules: { 'prettier/prettier': 'error' },
|
|
10
14
|
},
|
|
11
|
-
|
|
15
|
+
)
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import reactJsxRuntime from 'eslint-plugin-react/configs/jsx-runtime.js'
|
|
2
2
|
import reactRecommended from 'eslint-plugin-react/configs/recommended.js'
|
|
3
3
|
import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
4
|
+
import tseslint from 'typescript-eslint'
|
|
4
5
|
|
|
5
|
-
export default
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export default tseslint.config(
|
|
7
|
+
{
|
|
8
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
9
|
+
extends: reactRecommended,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
13
|
+
extends: reactJsxRuntime,
|
|
14
|
+
},
|
|
8
15
|
{
|
|
9
16
|
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
10
17
|
plugins: { 'react-hooks': reactHooksPlugin },
|
|
@@ -50,4 +57,4 @@ export default [
|
|
|
50
57
|
...reactHooksPlugin.configs.recommended.rules,
|
|
51
58
|
},
|
|
52
59
|
},
|
|
53
|
-
|
|
60
|
+
)
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import sonarjs from 'eslint-plugin-sonarjs'
|
|
2
|
+
import tseslint from 'typescript-eslint'
|
|
2
3
|
|
|
3
|
-
export default
|
|
4
|
+
export default tseslint.config({
|
|
5
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
6
|
+
extends: sonarjs.configs.recommended,
|
|
7
|
+
})
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import unicornPlugin from 'eslint-plugin-unicorn'
|
|
2
|
+
import tseslint from 'typescript-eslint'
|
|
2
3
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
4
|
+
export default tseslint.config(
|
|
5
|
+
{
|
|
6
|
+
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
7
|
+
extends: unicornPlugin.configs['flat/recommended'],
|
|
8
|
+
},
|
|
5
9
|
{
|
|
6
10
|
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
|
|
7
11
|
rules: {
|
|
@@ -23,4 +27,4 @@ export default [
|
|
|
23
27
|
],
|
|
24
28
|
},
|
|
25
29
|
},
|
|
26
|
-
|
|
30
|
+
)
|