@mikey-pro/eslint-config 3.2.1 → 3.2.6

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 -2
  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
19
  tsconfigRootDir: __dirname,
20
- project: ['./tsconfig.json'],
20
+ project: ['../../../tsconfig.json'],
21
+ extraFileExtensions: ['.vue', '.svelte'],
21
22
  sourceType: 'module',
22
23
  ecmaVersion: 'latest',
23
24
  ecmaFeatures: {
@@ -26,10 +27,80 @@ 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
+ 'prettier/prettier': [2, { parser: 'typescript' }],
41
+ },
42
+ },
43
+ {
44
+ files: ['*.tsx'],
45
+ parser: '@typescript-eslint/parser',
46
+ extends: [
47
+ 'airbnb-typescript',
48
+ 'plugin:react/recommended',
49
+ 'plugin:react-hooks/recommended',
50
+ 'plugin:@typescript-eslint/recommended',
51
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking',
52
+ ],
53
+ plugins: ['@typescript-eslint', 'react', 'react-hooks'],
54
+ parserOptions: {
55
+ tsconfigRootDir: __dirname,
56
+ project: ['../../../tsconfig.json'],
57
+ extraFileExtensions: ['.vue', '.svelte'],
58
+ sourceType: 'module',
59
+ ecmaVersion: 'latest',
60
+ ecmaFeatures: {
61
+ jsx: true,
62
+ },
63
+ },
64
+ rules: {
65
+ 'import/named': 0,
66
+ 'import/namespace': 0,
67
+ 'import/default': 0,
68
+ 'import/no-named-as-default-member': 0,
69
+ '@typescript-eslint/indent': 0,
70
+ 'react/state-in-constructor': 0,
71
+ 'react/no-deprecated': 2,
72
+ 'react/react-in-jsx-scope': 0,
73
+ 'react/display-name': [1, { ignoreTranspilerName: false }],
74
+ 'react/jsx-no-bind': [
75
+ 1,
76
+ {
77
+ ignoreRefs: true,
78
+ allowFunctions: true,
79
+ allowArrowFunctions: true,
80
+ },
81
+ ],
82
+ 'react/no-string-refs': 2,
83
+ 'react/no-find-dom-node': 2,
84
+ 'react/jsx-no-comment-textnodes': 2,
85
+ 'react/jsx-curly-spacing': 2,
86
+ 'react/jsx-no-undef': 2,
87
+ 'react/jsx-uses-react': 2,
88
+ 'react/jsx-uses-vars': 2,
89
+ 'react/function-component-definition': 0,
90
+ 'react/jsx-no-duplicate-props': 2,
91
+ 'react/jsx-no-target-blank': 2,
92
+ 'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
93
+ 'react/jsx-key': [2, { checkFragmentShorthand: true }],
94
+ 'react/self-closing-comp': 2,
95
+ 'react/prefer-es6-class': 2,
96
+ 'react/prefer-stateless-function': 1,
97
+ 'react/require-render-return': 2,
98
+ 'react/no-danger': 1,
99
+ 'react/no-did-mount-set-state': 2,
100
+ 'react/no-did-update-set-state': 2,
101
+ 'react/no-is-mounted': 2,
102
+ 'react-hooks/rules-of-hooks': 2,
103
+ 'react-hooks/exhaustive-deps': 1,
33
104
  'prettier/prettier': [2, { parser: 'typescript' }],
34
105
  },
35
106
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "3.2.1",
3
+ "version": "3.2.6",
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",