@st1ggy/linter-config 1.0.21 → 1.0.22

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.
@@ -3,104 +3,105 @@ import prettierConfig from 'eslint-config-prettier'
3
3
  import importPlugin from 'eslint-plugin-import'
4
4
  import prettierPlugin from 'eslint-plugin-prettier'
5
5
 
6
- export default {
7
- root: true,
8
- plugins: {
9
- import: importPlugin,
10
- prettier: prettierPlugin,
11
- },
12
- rules: {
13
- ...eslint.configs.recommended.rules,
14
- ...prettierConfig.rules,
15
- 'no-console': 'warn',
16
- 'no-debugger': 'warn',
17
- 'prettier/prettier': 'error',
18
- 'object-curly-newline': 'off',
19
- 'operator-linebreak': 'off',
20
- 'function-paren-newline': 'off',
21
- 'no-confusing-arrow': 'off',
22
- 'newline-per-chained-call': 'off',
23
- indent: 'off',
24
- 'implicit-arrow-linebreak': 'off',
25
- 'no-undef': 'off',
26
- 'lines-between-class-members': [
27
- 'error',
28
- 'always',
29
- {
30
- exceptAfterSingleLine: true,
31
- },
32
- ],
33
- 'prefer-template': 'error',
34
- 'arrow-body-style': ['error', 'as-needed'],
35
- 'no-return-assign': 'off',
36
- 'newline-before-return': ['error'],
37
- radix: 'off',
38
- 'no-mixed-operators': 'off',
39
- 'max-len': [
40
- 'error',
41
- {
42
- code: 120,
43
- tabWidth: 2,
44
- ignoreComments: true,
45
- ignoreRegExpLiterals: true,
46
- ignoreStrings: true,
47
- ignoreTrailingComments: true,
48
- },
49
- ],
50
- camelcase: [
51
- 'error',
52
- {
53
- allow: ['Open_Sans'],
54
- },
55
- ],
56
- 'no-shadow': 'off',
57
- 'no-unused-vars': 'off',
58
- 'no-use-before-define': 'off',
59
- 'import/newline-after-import': 'error',
60
- 'sort-imports': [
61
- 'error',
62
- {
63
- ignoreDeclarationSort: true,
64
- },
65
- ],
66
- 'import/order': [
67
- 'error',
68
- {
69
- 'newlines-between': 'always',
70
- groups: [['builtin', 'external'], ['internal'], ['sibling', 'parent', 'index', 'object'], ['type']],
71
- pathGroups: [
72
- {
73
- pattern: '@/**',
74
- group: 'external',
75
- position: 'after',
6
+ export default [
7
+ eslint.configs.recommended,
8
+ prettierConfig,
9
+ {
10
+ plugins: {
11
+ import: importPlugin,
12
+ prettier: prettierPlugin,
13
+ },
14
+ rules: {
15
+ 'no-console': 'warn',
16
+ 'no-debugger': 'warn',
17
+ 'prettier/prettier': 'error',
18
+ 'object-curly-newline': 'off',
19
+ 'operator-linebreak': 'off',
20
+ 'function-paren-newline': 'off',
21
+ 'no-confusing-arrow': 'off',
22
+ 'newline-per-chained-call': 'off',
23
+ indent: 'off',
24
+ 'implicit-arrow-linebreak': 'off',
25
+ 'no-undef': 'off',
26
+ 'lines-between-class-members': [
27
+ 'error',
28
+ 'always',
29
+ {
30
+ exceptAfterSingleLine: true,
31
+ },
32
+ ],
33
+ 'prefer-template': 'error',
34
+ 'arrow-body-style': ['error', 'as-needed'],
35
+ 'no-return-assign': 'off',
36
+ 'newline-before-return': ['error'],
37
+ radix: 'off',
38
+ 'no-mixed-operators': 'off',
39
+ 'max-len': [
40
+ 'error',
41
+ {
42
+ code: 120,
43
+ tabWidth: 2,
44
+ ignoreComments: true,
45
+ ignoreRegExpLiterals: true,
46
+ ignoreStrings: true,
47
+ ignoreTrailingComments: true,
48
+ },
49
+ ],
50
+ camelcase: [
51
+ 'error',
52
+ {
53
+ allow: ['Open_Sans'],
54
+ },
55
+ ],
56
+ 'no-shadow': 'off',
57
+ 'no-unused-vars': 'off',
58
+ 'no-use-before-define': 'off',
59
+ 'import/newline-after-import': 'error',
60
+ 'sort-imports': [
61
+ 'error',
62
+ {
63
+ ignoreDeclarationSort: true,
64
+ },
65
+ ],
66
+ 'import/order': [
67
+ 'error',
68
+ {
69
+ 'newlines-between': 'always',
70
+ groups: [['builtin', 'external'], ['internal'], ['sibling', 'parent', 'index', 'object'], ['type']],
71
+ pathGroups: [
72
+ {
73
+ pattern: '@/**',
74
+ group: 'external',
75
+ position: 'after',
76
+ },
77
+ ],
78
+ alphabetize: {
79
+ order: 'asc',
80
+ caseInsensitive: false,
76
81
  },
77
- ],
78
- alphabetize: {
79
- order: 'asc',
80
- caseInsensitive: false,
81
82
  },
82
- },
83
- ],
84
- quotes: ['error', 'single'],
85
- 'import/no-duplicates': [
86
- 'error',
87
- {
88
- considerQueryString: true,
89
- },
90
- ],
91
- 'object-shorthand': 'error',
92
- 'prefer-const': 'error',
93
- 'class-methods-use-this': 'off',
94
- 'import/prefer-default-export': 'off',
95
- 'import/extensions': [
96
- 'error',
97
- 'never',
98
- {
99
- js: 'never',
100
- json: 'ignorePackages',
101
- },
102
- ],
103
- 'import/no-unresolved': ['error', {}],
104
- 'spaced-comment': ['error', 'always'],
83
+ ],
84
+ quotes: ['error', 'single'],
85
+ 'import/no-duplicates': [
86
+ 'error',
87
+ {
88
+ considerQueryString: true,
89
+ },
90
+ ],
91
+ 'object-shorthand': 'error',
92
+ 'prefer-const': 'error',
93
+ 'class-methods-use-this': 'off',
94
+ 'import/prefer-default-export': 'off',
95
+ 'import/extensions': [
96
+ 'error',
97
+ 'never',
98
+ {
99
+ js: 'never',
100
+ json: 'ignorePackages',
101
+ },
102
+ ],
103
+ 'import/no-unresolved': ['error', {}],
104
+ 'spaced-comment': ['error', 'always'],
105
+ },
105
106
  },
106
- }
107
+ ]
@@ -3,55 +3,55 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks'
3
3
 
4
4
  import typescript from './eslint.config.typescript.js'
5
5
 
6
- export default {
7
- ...typescript,
8
- plugins: {
9
- ...typescript.plugins,
10
- react: reactPlugin,
11
- 'react-hooks': reactHooksPlugin,
6
+ export default [
7
+ typescript,
8
+ {
9
+ plugins: {
10
+ react: reactPlugin,
11
+ 'react-hooks': reactHooksPlugin,
12
+ },
13
+ rules: {
14
+ 'react/sort-comp': 'off',
15
+ 'react/prop-types': 'off',
16
+ 'react/jsx-curly-newline': 'off',
17
+ 'react/state-in-constructor': 'off',
18
+ 'react/require-default-props': 'off',
19
+ 'react/jsx-props-no-spreading': 'off',
20
+ 'react/jsx-filename-extension': 'off',
21
+ 'react/destructuring-assignment': 'off',
22
+ 'react/static-property-placement': 'off',
23
+ 'react/jsx-one-expression-per-line': 'off',
24
+ 'react/self-closing-comp': [
25
+ 'error',
26
+ {
27
+ component: true,
28
+ html: true,
29
+ },
30
+ ],
31
+ 'react/default-props-match-prop-types': [
32
+ 'warn',
33
+ {
34
+ allowRequiredDefaults: true,
35
+ },
36
+ ],
37
+ 'react/jsx-wrap-multilines': 'off',
38
+ 'react/jsx-indent': 'off',
39
+ 'react-hooks/rules-of-hooks': 'error',
40
+ 'react-hooks/exhaustive-deps': 'error',
41
+ 'react/function-component-definition': [
42
+ 'error',
43
+ {
44
+ namedComponents: 'arrow-function',
45
+ unnamedComponents: 'arrow-function',
46
+ },
47
+ ],
48
+ 'react/jsx-curly-brace-presence': [
49
+ 'warn',
50
+ {
51
+ props: 'never',
52
+ children: 'never',
53
+ },
54
+ ],
55
+ },
12
56
  },
13
- rules: {
14
- ...typescript.rules,
15
- 'react/sort-comp': 'off',
16
- 'react/prop-types': 'off',
17
- 'react/jsx-curly-newline': 'off',
18
- 'react/state-in-constructor': 'off',
19
- 'react/require-default-props': 'off',
20
- 'react/jsx-props-no-spreading': 'off',
21
- 'react/jsx-filename-extension': 'off',
22
- 'react/destructuring-assignment': 'off',
23
- 'react/static-property-placement': 'off',
24
- 'react/jsx-one-expression-per-line': 'off',
25
- 'react/self-closing-comp': [
26
- 'error',
27
- {
28
- component: true,
29
- html: true,
30
- },
31
- ],
32
- 'react/default-props-match-prop-types': [
33
- 'warn',
34
- {
35
- allowRequiredDefaults: true,
36
- },
37
- ],
38
- 'react/jsx-wrap-multilines': 'off',
39
- 'react/jsx-indent': 'off',
40
- 'react-hooks/rules-of-hooks': 'error',
41
- 'react-hooks/exhaustive-deps': 'error',
42
- 'react/function-component-definition': [
43
- 'error',
44
- {
45
- namedComponents: 'arrow-function',
46
- unnamedComponents: 'arrow-function',
47
- },
48
- ],
49
- 'react/jsx-curly-brace-presence': [
50
- 'warn',
51
- {
52
- props: 'never',
53
- children: 'never',
54
- },
55
- ],
56
- },
57
- }
57
+ ]
@@ -2,38 +2,41 @@ import tseslint from 'typescript-eslint'
2
2
 
3
3
  import common from './eslint.config.common.js'
4
4
 
5
- export default tseslint.config(...tseslint.configs.strict, ...tseslint.configs.stylistic, ...common, {
6
- rules: {
7
- '@typescript-eslint/no-explicit-any': 'off',
8
- '@typescript-eslint/ban-types': ['warn'],
9
- '@typescript-eslint/no-shadow': [
10
- 'error',
11
- {
12
- ignoreTypeValueShadow: true,
13
- },
14
- ],
15
- '@typescript-eslint/no-var-requires': ['off'],
16
- '@typescript-eslint/no-empty-function': ['off'],
17
- '@typescript-eslint/no-use-before-define': ['error'],
18
- '@typescript-eslint/no-unused-vars': [
19
- 'error',
20
- {
21
- ignoreRestSiblings: true,
22
- },
23
- ],
24
- '@typescript-eslint/ban-ts-comment': [
25
- 'error',
26
- {
27
- 'ts-expect-error': 'allow-with-description',
28
- 'ts-ignore': 'allow-with-description',
29
- },
30
- ],
31
- '@typescript-eslint/switch-exhaustiveness-check': 'error',
32
- '@typescript-eslint/consistent-type-imports': [
33
- 'error',
34
- {
35
- fixStyle: 'inline-type-imports',
36
- },
37
- ],
5
+ export default tseslint.config(...tseslint.configs.strict, ...tseslint.configs.stylistic, [
6
+ common,
7
+ {
8
+ rules: {
9
+ '@typescript-eslint/no-explicit-any': 'off',
10
+ '@typescript-eslint/ban-types': ['warn'],
11
+ '@typescript-eslint/no-shadow': [
12
+ 'error',
13
+ {
14
+ ignoreTypeValueShadow: true,
15
+ },
16
+ ],
17
+ '@typescript-eslint/no-var-requires': ['off'],
18
+ '@typescript-eslint/no-empty-function': ['off'],
19
+ '@typescript-eslint/no-use-before-define': ['error'],
20
+ '@typescript-eslint/no-unused-vars': [
21
+ 'error',
22
+ {
23
+ ignoreRestSiblings: true,
24
+ },
25
+ ],
26
+ '@typescript-eslint/ban-ts-comment': [
27
+ 'error',
28
+ {
29
+ 'ts-expect-error': 'allow-with-description',
30
+ 'ts-ignore': 'allow-with-description',
31
+ },
32
+ ],
33
+ '@typescript-eslint/switch-exhaustiveness-check': 'error',
34
+ '@typescript-eslint/consistent-type-imports': [
35
+ 'error',
36
+ {
37
+ fixStyle: 'inline-type-imports',
38
+ },
39
+ ],
40
+ },
38
41
  },
39
- })
42
+ ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@st1ggy/linter-config",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "ESLint, Stylelint and Prettier configs for React, Vue [WIP] and Svelte [WIP]",
5
5
  "private": false,
6
6
  "main": "index.js",