@mikey-pro/eslint-config 3.2.3 → 3.2.8

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/index.cjs +74 -5
  2. package/package.json +3 -2
package/index.cjs CHANGED
@@ -13,11 +13,12 @@ module.exports = {
13
13
  ],
14
14
  overrides: [
15
15
  {
16
- files: ['*.ts', '*.tsx'],
16
+ files: ['*.ts'],
17
17
  parser: '@typescript-eslint/parser',
18
18
  parserOptions: {
19
19
  tsconfigRootDir: __dirname,
20
20
  project: ['../../../tsconfig.json'],
21
+ extraFileExtensions: ['.vue', '.svelte'],
21
22
  sourceType: 'module',
22
23
  ecmaVersion: 'latest',
23
24
  ecmaFeatures: {
@@ -26,10 +27,82 @@ module.exports = {
26
27
  },
27
28
  plugins: ['@typescript-eslint'],
28
29
  extends: [
30
+ 'airbnb-typescript',
29
31
  'plugin:@typescript-eslint/recommended',
30
32
  'plugin:@typescript-eslint/recommended-requiring-type-checking',
31
33
  ],
32
34
  rules: {
35
+ 'import/named': 0,
36
+ 'import/namespace': 0,
37
+ 'import/default': 0,
38
+ 'import/no-named-as-default-member': 0,
39
+ '@typescript-eslint/indent': 0,
40
+ '@typescript-eslint/naming-convention': 0,
41
+ 'prettier/prettier': [2, { parser: 'typescript' }],
42
+ },
43
+ },
44
+ {
45
+ files: ['*.tsx'],
46
+ parser: '@typescript-eslint/parser',
47
+ extends: [
48
+ 'airbnb-typescript',
49
+ 'plugin:react/recommended',
50
+ 'plugin:react-hooks/recommended',
51
+ 'plugin:@typescript-eslint/recommended',
52
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking',
53
+ ],
54
+ plugins: ['@typescript-eslint', 'react', 'react-hooks'],
55
+ parserOptions: {
56
+ tsconfigRootDir: __dirname,
57
+ project: ['../../../tsconfig.json'],
58
+ extraFileExtensions: ['.vue', '.svelte'],
59
+ sourceType: 'module',
60
+ ecmaVersion: 'latest',
61
+ ecmaFeatures: {
62
+ jsx: true,
63
+ },
64
+ },
65
+ rules: {
66
+ 'import/named': 0,
67
+ 'import/namespace': 0,
68
+ 'import/default': 0,
69
+ 'import/no-named-as-default-member': 0,
70
+ '@typescript-eslint/naming-convention': 0,
71
+ '@typescript-eslint/indent': 0,
72
+ 'react/state-in-constructor': 0,
73
+ 'react/no-deprecated': 2,
74
+ 'react/react-in-jsx-scope': 0,
75
+ 'react/display-name': [1, { ignoreTranspilerName: false }],
76
+ 'react/jsx-no-bind': [
77
+ 1,
78
+ {
79
+ ignoreRefs: true,
80
+ allowFunctions: true,
81
+ allowArrowFunctions: true,
82
+ },
83
+ ],
84
+ 'react/no-string-refs': 2,
85
+ 'react/no-find-dom-node': 2,
86
+ 'react/jsx-no-comment-textnodes': 2,
87
+ 'react/jsx-curly-spacing': 2,
88
+ 'react/jsx-no-undef': 2,
89
+ 'react/jsx-uses-react': 2,
90
+ 'react/jsx-uses-vars': 2,
91
+ 'react/function-component-definition': 0,
92
+ 'react/jsx-no-duplicate-props': 2,
93
+ 'react/jsx-no-target-blank': 2,
94
+ 'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
95
+ 'react/jsx-key': [2, { checkFragmentShorthand: true }],
96
+ 'react/self-closing-comp': 2,
97
+ 'react/prefer-es6-class': 2,
98
+ 'react/prefer-stateless-function': 1,
99
+ 'react/require-render-return': 2,
100
+ 'react/no-danger': 1,
101
+ 'react/no-did-mount-set-state': 2,
102
+ 'react/no-did-update-set-state': 2,
103
+ 'react/no-is-mounted': 2,
104
+ 'react-hooks/rules-of-hooks': 2,
105
+ 'react-hooks/exhaustive-deps': 1,
33
106
  'prettier/prettier': [2, { parser: 'typescript' }],
34
107
  },
35
108
  },
@@ -92,7 +165,6 @@ module.exports = {
92
165
  },
93
166
  },
94
167
  rules: {
95
- 'react/state-in-constructor': 0,
96
168
  'react/no-deprecated': 2,
97
169
  'react/react-in-jsx-scope': 0,
98
170
  'react/display-name': [1, { ignoreTranspilerName: false }],
@@ -426,9 +498,6 @@ module.exports = {
426
498
  pragma: 'h',
427
499
  version: 'preact',
428
500
  },
429
- 'import/resolver': {
430
- typescript: {},
431
- },
432
501
  },
433
502
  parser: '@babel/eslint-parser',
434
503
  parserOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "3.2.3",
3
+ "version": "3.2.8",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.cjs",
6
6
  "dependencies": {
@@ -17,6 +17,7 @@
17
17
  "@vue/eslint-config-airbnb": "^6.0",
18
18
  "babel-preset-airbnb": "^5.0.0",
19
19
  "eslint-config-airbnb": "^19.0",
20
+ "eslint-config-airbnb-typescript": "^16.1.0",
20
21
  "eslint-config-prettier": "^8.3",
21
22
  "eslint-config-standard": "^16.0.3",
22
23
  "eslint-import-resolver-typescript": "^2.5.0",
@@ -38,7 +39,7 @@
38
39
  "eslint-plugin-svelte3": "^3.2.1",
39
40
  "eslint-plugin-toml": "^0.3.0",
40
41
  "eslint-plugin-unicorn": "^39.0.0",
41
- "eslint-plugin-vue": "^8.1",
42
+ "eslint-plugin-vue": "^8.2",
42
43
  "eslint-plugin-yaml": "^0.5.0",
43
44
  "vue-eslint-parser": "^8.0"
44
45
  },