@mikey-pro/eslint-config 3.2.2 → 3.2.7

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 +72 -6
  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,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
  },
@@ -425,11 +496,6 @@ module.exports = {
425
496
  pragma: 'h',
426
497
  version: 'preact',
427
498
  },
428
- settings: {
429
- 'import/resolver': {
430
- typescript: {},
431
- },
432
- },
433
499
  },
434
500
  parser: '@babel/eslint-parser',
435
501
  parserOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "3.2.2",
3
+ "version": "3.2.7",
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
  },