@voiceflow/eslint-config 7.17.0 → 7.17.1-616fa09.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voiceflow/eslint-config",
3
- "version": "7.17.0",
3
+ "version": "7.17.1-616fa09.3+616fa09",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -19,8 +19,9 @@
19
19
  "test:dependencies": "yarn g:depcruise --ignore-known"
20
20
  },
21
21
  "dependencies": {
22
- "@typescript-eslint/eslint-plugin": "8.47.0",
23
- "@typescript-eslint/parser": "8.47.0",
22
+ "@stylistic/eslint-plugin": "5.6.1",
23
+ "@typescript-eslint/eslint-plugin": "8.49.0",
24
+ "@typescript-eslint/parser": "8.49.0",
24
25
  "eslint-config-airbnb-base": "15.0.0",
25
26
  "eslint-config-prettier": "10.1.8",
26
27
  "eslint-formatter-junit": "9.0.1",
@@ -28,8 +29,9 @@
28
29
  "eslint-import-resolver-typescript": "4.4.4",
29
30
  "eslint-plugin-eslint-comments": "3.2.0",
30
31
  "eslint-plugin-import": "2.32.0",
31
- "eslint-plugin-jsdoc": "61.3.0",
32
+ "eslint-plugin-jsdoc": "61.5.0",
32
33
  "eslint-plugin-mdx": "3.6.2",
34
+ "eslint-plugin-n": "17.23.1",
33
35
  "eslint-plugin-no-secrets": "2.2.1",
34
36
  "eslint-plugin-prettier": "5.5.4",
35
37
  "eslint-plugin-promise": "7.2.1",
@@ -52,5 +54,5 @@
52
54
  "volta": {
53
55
  "extends": "../../package.json"
54
56
  },
55
- "gitHead": "f5a0d348e42864b285e87e723a51fb3f54e1e9c4"
57
+ "gitHead": "616fa09c17c109bdd4b268430e44e8abff6b2f86"
56
58
  }
package/src/index.js CHANGED
@@ -1,9 +1,36 @@
1
- import base from './base.js';
1
+ import airbnb from './presets/airbnb.js';
2
+ import common from './presets/common.js';
3
+ import import_ from './presets/import.js';
2
4
  import mdx from './presets/mdx.js';
3
5
  import nest from './presets/nest.js';
6
+ import stylistic from './presets/stylistic.js';
4
7
  import typescript from './presets/typescript.js';
5
8
  import utility from './presets/utility.js';
6
9
  import voiceflow from './presets/voiceflow.js';
7
10
 
8
11
  /** @type {import('eslint').Linter.Config[]} */
9
- export default [...base, ...typescript, ...mdx, ...nest, ...utility, ...voiceflow];
12
+ export default [
13
+ {
14
+ ignores: [
15
+ '**/build/**',
16
+ '**/dist/**',
17
+ '**/node_modules/**',
18
+ '**/sonar/**',
19
+ '**/generated/**',
20
+ '**/.yarn/**',
21
+ '**/.yalc/**',
22
+ '**/.turbo/**',
23
+ '**/.vercel/**',
24
+ '**/*.json',
25
+ ],
26
+ },
27
+ ...airbnb,
28
+ ...common,
29
+ ...import_,
30
+ ...stylistic,
31
+ ...typescript,
32
+ ...mdx,
33
+ ...nest,
34
+ ...utility,
35
+ ...voiceflow,
36
+ ];
@@ -1,5 +1,6 @@
1
1
  import comments from 'eslint-plugin-eslint-comments';
2
2
  import jsdoc from 'eslint-plugin-jsdoc';
3
+ import node from 'eslint-plugin-n';
3
4
  import noSecrets from 'eslint-plugin-no-secrets';
4
5
  import prettier from 'eslint-plugin-prettier/recommended';
5
6
  import promise from 'eslint-plugin-promise';
@@ -15,6 +16,7 @@ export default [
15
16
  sonarjs,
16
17
  promise,
17
18
  unicorn,
19
+ node,
18
20
  'eslint-comments': comments,
19
21
  'you-dont-need-lodash-underscore': youDontNeed,
20
22
  'no-secrets': noSecrets,
@@ -38,29 +40,15 @@ export default [
38
40
 
39
41
  rules: {
40
42
  // error
41
- 'arrow-parens': ['error', 'always'],
42
- 'callback-return': 'error',
43
43
  'capitalized-comments': 'error',
44
- 'handle-callback-err': 'error',
45
44
  'max-depth': ['error', 3],
46
- 'max-len': [
47
- 'error',
48
- {
49
- code: 150,
50
- ignoreUrls: true,
51
- ignoreStrings: true,
52
- ignoreTemplateLiterals: true,
53
- ignoreRegExpLiterals: true,
54
- },
55
- ],
56
45
  'max-nested-callbacks': ['error', 5],
57
46
  'max-params': ['error', 5],
58
47
  'no-console': 'error',
59
- 'no-process-exit': 'error',
48
+ 'no-object-constructor': 'error',
49
+ 'no-new-native-nonconstructor': 'error',
60
50
  'no-useless-call': 'error',
61
- 'quote-props': ['error', 'as-needed'],
62
51
  'prefer-arrow-callback': ['error', { allowNamedFunctions: true, allowUnboundThis: true }],
63
- 'lines-between-class-members': 'error',
64
52
  'no-restricted-imports': [
65
53
  'error',
66
54
  {
@@ -78,6 +66,14 @@ export default [
78
66
 
79
67
  'no-secrets/no-secrets': 'error',
80
68
 
69
+ 'node/callback-return': 'error',
70
+ 'node/global-require': 'error',
71
+ 'node/handle-callback-err': 'error',
72
+ 'node/no-deprecated-api': 'error',
73
+ 'node/no-new-require': 'error',
74
+ 'node/no-path-concat': 'error',
75
+ 'node/no-process-exit': 'error',
76
+
81
77
  'unicorn/better-regex': 'error',
82
78
  'unicorn/prefer-set-has': 'error',
83
79
 
@@ -92,13 +88,21 @@ export default [
92
88
  'no-plusplus': 'off',
93
89
  'no-continue': 'off',
94
90
  'require-jsdoc': 'off', // not sure we want this
95
- quotes: ['error', 'single', 'avoid-escape'],
96
91
  'valid-jsdoc': 'off',
97
92
  'func-names': 'off',
93
+ 'global-require': 'off',
98
94
  'class-methods-use-this': 'off',
99
95
  camelcase: 'off',
96
+ 'lines-around-directive': 'off',
97
+ 'lines-between-class-members': 'off',
98
+ 'no-buffer-constructor': 'off',
99
+ 'no-new-object': 'off',
100
+ 'no-new-require': 'off',
101
+ 'no-new-symbol': 'off',
102
+ 'no-path-concat': 'off',
100
103
  'no-underscore-dangle': 'off',
101
104
  'no-restricted-syntax': 'off',
105
+ 'no-return-await': 'off',
102
106
  'sonarjs/new-cap': 'off',
103
107
  'sonarjs/no-unreachable': 'off',
104
108
  'sonarjs/no-commented-code': 'off',
@@ -10,8 +10,8 @@ export default [
10
10
  ...mdx.flat.rules,
11
11
  'no-secrets/no-secrets': 'off',
12
12
  'react/jsx-no-undef': 'off',
13
+ '@stylistic/max-len': 'off',
13
14
  'no-unused-vars': 'off',
14
- 'max-len': 'off',
15
15
  },
16
16
  },
17
17
  {
@@ -1,4 +1,4 @@
1
- /** @type {import('eslint').Linter.Config} */
1
+ /** @type {import('eslint').Linter.Config[]} */
2
2
  export default [
3
3
  {
4
4
  files: ['**/*.controller.ts', '**/*.decorator.ts', '**/*.factory.ts', '**/*.module.ts', '**/*.service.ts'],
@@ -0,0 +1,33 @@
1
+ import stylistic from '@stylistic/eslint-plugin';
2
+
3
+ /** @type {import('eslint').Linter.Config[]} */
4
+ export default [
5
+ stylistic.configs['disable-legacy'],
6
+ {
7
+ plugins: {
8
+ '@stylistic': stylistic,
9
+ },
10
+ rules: {
11
+ '@stylistic/arrow-parens': 'error',
12
+ '@stylistic/padding-line-between-statements': [
13
+ 'error',
14
+ { blankLine: 'always', prev: 'directive', next: '*' },
15
+ { blankLine: 'any', prev: 'directive', next: 'directive' },
16
+ ],
17
+ '@stylistic/lines-between-class-members': 'error',
18
+ '@stylistic/max-len': [
19
+ 'error',
20
+ {
21
+ code: 150,
22
+ ignoreUrls: true,
23
+ ignoreStrings: true,
24
+ ignoreTemplateLiterals: true,
25
+ ignoreRegExpLiterals: true,
26
+ },
27
+ ],
28
+ '@stylistic/quote-props': ['error', 'as-needed'],
29
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
30
+ '@stylistic/spaced-comment': 'error',
31
+ },
32
+ },
33
+ ];
@@ -18,13 +18,6 @@ export default [
18
18
  ...typescript.configs.recommended.rules,
19
19
 
20
20
  // error
21
- '@typescript-eslint/no-empty-interface': [
22
- 'error',
23
- {
24
- // Allow `interface T extends U {}`
25
- allowSingleExtends: true,
26
- },
27
- ],
28
21
  '@typescript-eslint/no-empty-object-type': [
29
22
  'error',
30
23
  {
package/src/base.js DELETED
@@ -1,26 +0,0 @@
1
- import airbnb from './presets/airbnb.js';
2
- import common from './presets/common.js';
3
- import import_ from './presets/import.js';
4
- import voiceflow from './presets/voiceflow.js';
5
-
6
- /** @type {import('eslint').Linter.Config[]} */
7
- export default [
8
- {
9
- ignores: [
10
- '**/build/**',
11
- '**/dist/**',
12
- '**/node_modules/**',
13
- '**/sonar/**',
14
- '**/generated/**',
15
- '**/.yarn/**',
16
- '**/.yalc/**',
17
- '**/.turbo/**',
18
- '**/.vercel/**',
19
- '**/*.json',
20
- ],
21
- },
22
- ...airbnb,
23
- ...common,
24
- ...import_,
25
- ...voiceflow,
26
- ];