@mikey-pro/eslint-config 4.3.1 → 4.4.1

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.js +17 -22
  2. package/package.json +2 -1
package/index.js CHANGED
@@ -10,9 +10,22 @@ module.exports = {
10
10
  overrides: [
11
11
  {
12
12
  files: ['*.ts'],
13
+ parser: '@typescript-eslint/parser',
13
14
  parserOptions: {
15
+ tsconfigRootDir: __dirname,
16
+ project: ['../../../tsconfig.json'],
14
17
  extraFileExtensions: ['.vue', '.svelte'],
18
+ sourceType: 'module',
19
+ ecmaVersion: 'latest',
20
+ ecmaFeatures: {
21
+ jsx: true,
22
+ },
15
23
  },
24
+ plugins: ['@typescript-eslint'],
25
+ extends: [
26
+ 'plugin:@typescript-eslint/recommended',
27
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking',
28
+ ],
16
29
  rules: {
17
30
  'import/named': 0,
18
31
  'import/namespace': 0,
@@ -112,25 +125,6 @@ module.exports = {
112
125
  {
113
126
  files: ['*.jsx'],
114
127
  extends: ['react-app', 'react-app/jest'],
115
- parser: '@babel/eslint-parser',
116
- parserOptions: {
117
- requireConfigFile: false,
118
- ecmaVersion: 'latest',
119
- sourceType: 'module',
120
- babelOptions: {
121
- presets: [
122
- [
123
- '@babel/preset-env',
124
- {
125
- targets: {
126
- node: 'current',
127
- },
128
- },
129
- ],
130
- '@babel/preset-react',
131
- ],
132
- },
133
- },
134
128
  rules: {
135
129
  'react/no-deprecated': 1,
136
130
  'react/react-in-jsx-scope': 0,
@@ -296,7 +290,7 @@ module.exports = {
296
290
  node: true,
297
291
  es6: true,
298
292
  commonjs: true,
299
- es1011: true,
293
+ es2021: true,
300
294
  },
301
295
  rules: {
302
296
  'no-restricted-syntax': [
@@ -336,9 +330,9 @@ module.exports = {
336
330
  'newlines-between': 'always',
337
331
  },
338
332
  ],
339
- 'import/extensions': ['error', 'never', { ignorePackages: true }],
333
+ 'import/extensions': [1, 'never', { ignorePackages: true }],
340
334
  'prefer-destructuring': [
341
- 'error',
335
+ 1,
342
336
  {
343
337
  object: true,
344
338
  array: false,
@@ -446,6 +440,7 @@ module.exports = {
446
440
  '@babel',
447
441
  'unicorn',
448
442
  'sonarjs',
443
+ 'only-warn',
449
444
  ],
450
445
  ignorePatterns: [
451
446
  '!.*',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "4.3.1",
3
+ "version": "4.4.1",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -24,6 +24,7 @@
24
24
  "eslint-plugin-jsonc": "^2.0.0",
25
25
  "eslint-plugin-md": "^1.0",
26
26
  "eslint-plugin-node": "^11.1.0",
27
+ "eslint-plugin-only-warn": "^1.0.3",
27
28
  "eslint-plugin-prettier": "^4.0",
28
29
  "eslint-plugin-promise": "^6.0.0",
29
30
  "eslint-plugin-sonarjs": "^0.11.0",