@mikey-pro/eslint-config 3.2.0 → 3.2.5

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 +73 -3
  2. package/package.json +3 -1
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
- tsconfigRootDir: '../../../',
20
- project: ['./tsconfig.json'],
19
+ tsconfigRootDir: __dirname,
20
+ project: ['../../../tsconfig.json'],
21
+ extraFileExtensions: ['.vue', '.svelte'],
21
22
  sourceType: 'module',
22
23
  ecmaVersion: 'latest',
23
24
  ecmaFeatures: {
@@ -26,10 +27,78 @@ 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
+ 'prettier/prettier': [2, { parser: 'typescript' }],
40
+ },
41
+ },
42
+ {
43
+ files: ['*.tsx'],
44
+ parser: '@typescript-eslint/parser',
45
+ extends: [
46
+ 'airbnb-typescript',
47
+ 'plugin:react/recommended',
48
+ 'plugin:react-hooks/recommended',
49
+ 'plugin:@typescript-eslint/recommended',
50
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking',
51
+ ],
52
+ plugins: ['@typescript-eslint', 'react', 'react-hooks'],
53
+ parserOptions: {
54
+ tsconfigRootDir: __dirname,
55
+ project: ['../../../tsconfig.json'],
56
+ extraFileExtensions: ['.vue', '.svelte'],
57
+ sourceType: 'module',
58
+ ecmaVersion: 'latest',
59
+ ecmaFeatures: {
60
+ jsx: true,
61
+ },
62
+ },
63
+ rules: {
64
+ 'import/named': 0,
65
+ 'import/namespace': 0,
66
+ 'import/default': 0,
67
+ 'import/no-named-as-default-member': 0,
68
+ 'react/state-in-constructor': 0,
69
+ 'react/no-deprecated': 2,
70
+ 'react/react-in-jsx-scope': 0,
71
+ 'react/display-name': [1, { ignoreTranspilerName: false }],
72
+ 'react/jsx-no-bind': [
73
+ 1,
74
+ {
75
+ ignoreRefs: true,
76
+ allowFunctions: true,
77
+ allowArrowFunctions: true,
78
+ },
79
+ ],
80
+ 'react/no-string-refs': 2,
81
+ 'react/no-find-dom-node': 2,
82
+ 'react/jsx-no-comment-textnodes': 2,
83
+ 'react/jsx-curly-spacing': 2,
84
+ 'react/jsx-no-undef': 2,
85
+ 'react/jsx-uses-react': 2,
86
+ 'react/jsx-uses-vars': 2,
87
+ 'react/function-component-definition': 0,
88
+ 'react/jsx-no-duplicate-props': 2,
89
+ 'react/jsx-no-target-blank': 2,
90
+ 'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
91
+ 'react/jsx-key': [2, { checkFragmentShorthand: true }],
92
+ 'react/self-closing-comp': 2,
93
+ 'react/prefer-es6-class': 2,
94
+ 'react/prefer-stateless-function': 1,
95
+ 'react/require-render-return': 2,
96
+ 'react/no-danger': 1,
97
+ 'react/no-did-mount-set-state': 2,
98
+ 'react/no-did-update-set-state': 2,
99
+ 'react/no-is-mounted': 2,
100
+ 'react-hooks/rules-of-hooks': 2,
101
+ 'react-hooks/exhaustive-deps': 1,
33
102
  'prettier/prettier': [2, { parser: 'typescript' }],
34
103
  },
35
104
  },
@@ -415,6 +484,7 @@ module.exports = {
415
484
  'LICENSE',
416
485
  '.vscode',
417
486
  '.github',
487
+ 'tsconfig.json',
418
488
  ],
419
489
  root: true,
420
490
  settings: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "3.2.0",
3
+ "version": "3.2.5",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.cjs",
6
6
  "dependencies": {
@@ -17,8 +17,10 @@
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",
23
+ "eslint-import-resolver-typescript": "^2.5.0",
22
24
  "eslint-plugin-compat": "^4.0",
23
25
  "eslint-plugin-css-modules": "^2.11",
24
26
  "eslint-plugin-disable-autofix": "^0.1.6",