@voiceflow/eslint-config 3.2.2 → 4.0.0

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.
package/.eslintrc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- extends: ['@voiceflow/eslint-config', '@voiceflow/eslint-config/utility'],
2
+ extends: ['.'],
3
3
  rules: {
4
4
  'no-secrets/no-secrets': 'off',
5
5
  },
package/config/base.js CHANGED
@@ -6,10 +6,12 @@ module.exports = {
6
6
  'plugin:eslint-comments/recommended',
7
7
  'plugin:you-dont-need-lodash-underscore/compatible',
8
8
  ],
9
- plugins: ['sonarjs', 'promise', 'optimize-regex', 'prefer-arrow', 'no-secrets', 'filenames', 'you-dont-need-lodash-underscore'],
9
+ plugins: ['sonarjs', 'promise', 'prefer-arrow', 'no-secrets', 'you-dont-need-lodash-underscore', 'unicorn'],
10
10
  parserOptions: {
11
11
  ecmaVersion: 9,
12
12
  },
13
+ // https://eslint.org/docs/user-guide/configuring/rules#report-unused-eslint-disable-comments
14
+ reportUnusedDisableDirectives: true,
13
15
  rules: {
14
16
  // error
15
17
  'arrow-parens': ['error', 'always'],
@@ -50,7 +52,8 @@ module.exports = {
50
52
 
51
53
  'no-secrets/no-secrets': 'error',
52
54
 
53
- 'optimize-regex/optimize-regex': 'error',
55
+ 'unicorn/better-regex': 'error',
56
+ 'unicorn/prefer-string-slice': 'error',
54
57
 
55
58
  // warn
56
59
  'sonarjs/no-duplicate-string': 'warn',
@@ -62,5 +65,9 @@ module.exports = {
62
65
  quotes: ['error', 'single', 'avoid-escape'],
63
66
  'valid-jsdoc': 'off',
64
67
  'func-names': 'off',
68
+ 'class-methods-use-this': 'off',
69
+ 'import/prefer-default-export': 'off',
70
+ camelcase: 'off',
71
+ 'no-underscore-dangle': 'off',
65
72
  },
66
73
  };
package/config/import.js CHANGED
@@ -19,6 +19,7 @@ module.exports = {
19
19
  // off
20
20
  'sort-imports': 'off',
21
21
  'import/order': 'off',
22
+ 'import/no-named-as-default': 'off',
22
23
  },
23
24
  settings: {
24
25
  'import/extensions': ['.js', '.ts', '.jsx', '.tsx'],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@voiceflow/eslint-config",
3
3
  "description": "ESLint config for voiceflow",
4
- "version": "3.2.2",
4
+ "version": "4.0.0",
5
5
  "author": "Eric Hacke",
6
6
  "bugs": {
7
7
  "url": "https://github.com/voiceflow/eslint-config/issues"
@@ -12,45 +12,43 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@typescript-eslint/eslint-plugin": "^4.20.0",
16
- "@typescript-eslint/parser": "^4.20.0",
15
+ "@typescript-eslint/eslint-plugin": "^4.31.0",
16
+ "@typescript-eslint/parser": "^4.31.0",
17
17
  "eslint-config-airbnb-base": "^14.2.1",
18
- "eslint-config-prettier": "^8.1.0",
19
- "eslint-import-resolver-typescript": "^2.4.0",
20
- "eslint-plugin-compat": "^3.1.1",
21
- "eslint-plugin-cypress": "^2.11.2",
18
+ "eslint-config-prettier": "^8.3.0",
19
+ "eslint-import-resolver-typescript": "^2.5.0",
20
+ "eslint-plugin-compat": "^3.13.0",
21
+ "eslint-plugin-cypress": "^2.11.3",
22
22
  "eslint-plugin-eslint-comments": "^3.1.1",
23
- "eslint-plugin-filenames": "^1.3.2",
24
- "eslint-plugin-import": "^2.22.1",
25
- "eslint-plugin-jest": "^24.3.2",
23
+ "eslint-plugin-import": "^2.24.2",
24
+ "eslint-plugin-jest": "^24.4.0",
26
25
  "eslint-plugin-jsx-a11y": "^6.2.1",
27
- "eslint-plugin-lodash": "^7.2.0",
28
- "eslint-plugin-mocha": "^8.1.0",
26
+ "eslint-plugin-lodash": "^7.3.0",
27
+ "eslint-plugin-mocha": "^9.0.0",
29
28
  "eslint-plugin-no-secrets": "^0.8.9",
30
- "eslint-plugin-optimize-regex": "^1.2.0",
31
29
  "eslint-plugin-prefer-arrow": "^1.2.3",
32
- "eslint-plugin-prettier": "^3.1.0",
33
- "eslint-plugin-promise": "^4.3.1",
34
- "eslint-plugin-react": "^7.23.1",
30
+ "eslint-plugin-prettier": "^4.0.0",
31
+ "eslint-plugin-promise": "^5.1.0",
32
+ "eslint-plugin-react": "^7.25.1",
35
33
  "eslint-plugin-react-hooks": "^4.2.0",
36
34
  "eslint-plugin-simple-import-sort": "^7.0.0",
37
- "eslint-plugin-sonarjs": "^0.6.0",
35
+ "eslint-plugin-sonarjs": "^0.10.0",
36
+ "eslint-plugin-unicorn": "^37.0.1",
38
37
  "eslint-plugin-xss": "^0.1.9",
39
- "eslint-plugin-you-dont-need-lodash-underscore": "^6.11.0"
38
+ "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0"
40
39
  },
41
40
  "devDependencies": {
42
- "@voiceflow/commitlint-config": "^1.1.0",
43
- "@voiceflow/eslint-config": "^3.2.1",
44
- "@voiceflow/git-branch-check": "^1.2.0",
45
- "@voiceflow/prettier-config": "^1.0.5",
41
+ "@voiceflow/commitlint-config": "1.1.0",
42
+ "@voiceflow/git-branch-check": "1.2.0",
43
+ "@voiceflow/prettier-config": "1.0.5",
46
44
  "commitizen": "^4.2.4",
47
- "commitlint": "^12.1.4",
45
+ "commitlint": "^13.1.0",
48
46
  "cz-conventional-changelog": "^3.3.0",
49
- "eslint": "^7.26.0",
47
+ "eslint": "^7.32.0",
50
48
  "fixpack": "^4.0.0",
51
- "husky": "^6.0.0",
52
- "lint-staged": "^11.0.0",
53
- "prettier": "^2.3.0"
49
+ "husky": "^7.0.2",
50
+ "lint-staged": "^11.1.2",
51
+ "prettier": "^2.4.0"
54
52
  },
55
53
  "files": [
56
54
  "*.js",
package/typescript.js CHANGED
@@ -6,12 +6,26 @@ module.exports = {
6
6
  files: ['*.ts', '*.tsx'],
7
7
  extends: ['plugin:@typescript-eslint/recommended'],
8
8
  rules: {
9
+ // error
10
+ '@typescript-eslint/no-empty-interface': [
11
+ 'error',
12
+ {
13
+ // Allow `interface T extends U {}`
14
+ allowSingleExtends: true,
15
+ },
16
+ ],
17
+ '@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
18
+
9
19
  // off
10
20
  'no-shadow': 'off',
11
21
  'no-unused-vars': 'off',
12
22
  'no-use-before-define': 'off',
13
23
  'no-useless-constructor': 'off',
14
24
 
25
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
26
+ '@typescript-eslint/no-non-null-assertion': 'off',
27
+ '@typescript-eslint/no-explicit-any': 'off',
28
+
15
29
  'import/no-unresolved': 'off',
16
30
  'import/export': 'off',
17
31
  'import/named': 'off',
package/utility.js CHANGED
@@ -8,9 +8,6 @@ module.exports = {
8
8
  },
9
9
  ],
10
10
 
11
- // off
12
- 'import/prefer-default-export': 'off',
13
-
14
11
  '@typescript-eslint/no-var-requires': 'off',
15
12
  },
16
13
  };