@voiceflow/eslint-config 7.14.0 → 7.16.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/package.json +18 -18
- package/src/base.js +5 -5
- package/src/formatter.js +6 -5
- package/src/index.js +7 -7
- package/src/node.js +4 -3
- package/src/presets/airbnb.js +11 -8
- package/src/presets/common.js +10 -21
- package/src/presets/import.js +7 -9
- package/src/presets/mdx.js +2 -2
- package/src/presets/nest.js +1 -1
- package/src/presets/typescript.js +3 -3
- package/src/presets/utility.js +1 -1
- package/src/presets/voiceflow.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/eslint-config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.16.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"exports": {
|
|
5
6
|
".": "./src/index.js",
|
|
6
7
|
"./node": "./src/node.js"
|
|
@@ -18,30 +19,29 @@
|
|
|
18
19
|
"test:dependencies": "yarn g:depcruise --ignore-known"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
22
|
-
"@typescript-eslint/parser": "8.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "8.47.0",
|
|
23
|
+
"@typescript-eslint/parser": "8.47.0",
|
|
23
24
|
"eslint-config-airbnb-base": "15.0.0",
|
|
24
|
-
"eslint-config-prettier": "10.
|
|
25
|
-
"eslint-formatter-junit": "
|
|
26
|
-
"eslint-formatter-stylish": "
|
|
27
|
-
"eslint-import-resolver-typescript": "
|
|
25
|
+
"eslint-config-prettier": "10.1.8",
|
|
26
|
+
"eslint-formatter-junit": "9.0.1",
|
|
27
|
+
"eslint-formatter-stylish": "9.0.1",
|
|
28
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
28
29
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
29
|
-
"eslint-plugin-import": "2.
|
|
30
|
-
"eslint-plugin-jsdoc": "
|
|
31
|
-
"eslint-plugin-mdx": "3.
|
|
32
|
-
"eslint-plugin-no-secrets": "2.
|
|
33
|
-
"eslint-plugin-
|
|
34
|
-
"eslint-plugin-prettier": "5.2.3",
|
|
30
|
+
"eslint-plugin-import": "2.32.0",
|
|
31
|
+
"eslint-plugin-jsdoc": "61.3.0",
|
|
32
|
+
"eslint-plugin-mdx": "3.6.2",
|
|
33
|
+
"eslint-plugin-no-secrets": "2.2.1",
|
|
34
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
35
35
|
"eslint-plugin-promise": "7.2.1",
|
|
36
36
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
37
|
-
"eslint-plugin-sonarjs": "3.0.
|
|
38
|
-
"eslint-plugin-unicorn": "
|
|
37
|
+
"eslint-plugin-sonarjs": "3.0.5",
|
|
38
|
+
"eslint-plugin-unicorn": "62.0.0",
|
|
39
39
|
"eslint-plugin-you-dont-need-lodash-underscore": "6.14.0",
|
|
40
|
-
"globals": "
|
|
40
|
+
"globals": "16.5.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@voiceflow/dependency-cruiser-config": "1.8.9",
|
|
44
|
-
"@voiceflow/eslint-plugin": "1.
|
|
44
|
+
"@voiceflow/eslint-plugin": "1.4.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@voiceflow/eslint-plugin": "^1"
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"volta": {
|
|
53
53
|
"extends": "../../package.json"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "7c313da9e930246078db748eda0e785274fba20d"
|
|
56
56
|
}
|
package/src/base.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
5
|
|
|
6
6
|
/** @type {import('eslint').Linter.Config[]} */
|
|
7
|
-
|
|
7
|
+
export default [
|
|
8
8
|
{
|
|
9
9
|
ignores: [
|
|
10
10
|
'**/build/**',
|
package/src/formatter.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
const junit = require('eslint-formatter-junit');
|
|
3
|
-
const stylish = require('eslint-formatter-stylish');
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
import junit from 'eslint-formatter-junit';
|
|
4
|
+
import stylish from 'eslint-formatter-stylish';
|
|
5
|
+
|
|
6
|
+
export default async function (results, context) {
|
|
6
7
|
await fs.mkdir('reports', { recursive: true });
|
|
7
8
|
await fs.writeFile('reports/lint.report.xml', junit(results, context));
|
|
8
9
|
|
|
9
10
|
return stylish(results, context);
|
|
10
|
-
}
|
|
11
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import base from './base.js';
|
|
2
|
+
import mdx from './presets/mdx.js';
|
|
3
|
+
import nest from './presets/nest.js';
|
|
4
|
+
import typescript from './presets/typescript.js';
|
|
5
|
+
import utility from './presets/utility.js';
|
|
6
|
+
import voiceflow from './presets/voiceflow.js';
|
|
7
7
|
|
|
8
8
|
/** @type {import('eslint').Linter.Config[]} */
|
|
9
|
-
|
|
9
|
+
export default [...base, ...typescript, ...mdx, ...nest, ...utility, ...voiceflow];
|
package/src/node.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import globals from 'globals';
|
|
2
|
+
|
|
3
|
+
import baseConfig from './index.js';
|
|
3
4
|
|
|
4
5
|
/** @type {import('eslint').Linter.Config[]} */
|
|
5
|
-
|
|
6
|
+
export default [
|
|
6
7
|
...baseConfig,
|
|
7
8
|
{
|
|
8
9
|
languageOptions: {
|
package/src/presets/airbnb.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import bestPractices from 'eslint-config-airbnb-base/rules/best-practices';
|
|
2
|
+
import errors from 'eslint-config-airbnb-base/rules/errors';
|
|
3
|
+
import es6Rules from 'eslint-config-airbnb-base/rules/es6';
|
|
4
|
+
import nodeRules from 'eslint-config-airbnb-base/rules/node';
|
|
5
|
+
import strict from 'eslint-config-airbnb-base/rules/strict';
|
|
6
|
+
import style from 'eslint-config-airbnb-base/rules/style';
|
|
7
|
+
import variables from 'eslint-config-airbnb-base/rules/variables';
|
|
8
|
+
|
|
9
|
+
const { env: _nodeEnv, ...node } = nodeRules;
|
|
10
|
+
const { env: _es6Env, parserOptions: _es6Parser, ...es6 } = es6Rules;
|
|
8
11
|
|
|
9
12
|
/** @type {import('eslint').Linter.Config[]} */
|
|
10
|
-
|
|
13
|
+
export default [bestPractices, errors, node, style, variables, es6, strict];
|
package/src/presets/common.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const jsdoc = require('eslint-plugin-jsdoc');
|
|
1
|
+
import comments from 'eslint-plugin-eslint-comments';
|
|
2
|
+
import jsdoc from 'eslint-plugin-jsdoc';
|
|
3
|
+
import noSecrets from 'eslint-plugin-no-secrets';
|
|
4
|
+
import prettier from 'eslint-plugin-prettier/recommended';
|
|
5
|
+
import promise from 'eslint-plugin-promise';
|
|
6
|
+
import sonarjs from 'eslint-plugin-sonarjs';
|
|
7
|
+
import unicorn from 'eslint-plugin-unicorn';
|
|
8
|
+
import youDontNeed from 'eslint-plugin-you-dont-need-lodash-underscore';
|
|
10
9
|
|
|
11
10
|
/** @type {import('eslint').Linter.Config[]} */
|
|
12
|
-
|
|
11
|
+
export default [
|
|
13
12
|
{
|
|
14
13
|
plugins: {
|
|
15
14
|
jsdoc,
|
|
@@ -18,7 +17,6 @@ module.exports = [
|
|
|
18
17
|
unicorn,
|
|
19
18
|
'eslint-comments': comments,
|
|
20
19
|
'you-dont-need-lodash-underscore': youDontNeed,
|
|
21
|
-
'prefer-arrow': preferArrow,
|
|
22
20
|
'no-secrets': noSecrets,
|
|
23
21
|
},
|
|
24
22
|
},
|
|
@@ -61,7 +59,7 @@ module.exports = [
|
|
|
61
59
|
'no-process-exit': 'error',
|
|
62
60
|
'no-useless-call': 'error',
|
|
63
61
|
'quote-props': ['error', 'as-needed'],
|
|
64
|
-
'prefer-arrow-callback': 'error',
|
|
62
|
+
'prefer-arrow-callback': ['error', { allowNamedFunctions: true, allowUnboundThis: true }],
|
|
65
63
|
'lines-between-class-members': 'error',
|
|
66
64
|
'no-restricted-imports': [
|
|
67
65
|
'error',
|
|
@@ -75,15 +73,6 @@ module.exports = [
|
|
|
75
73
|
},
|
|
76
74
|
],
|
|
77
75
|
|
|
78
|
-
'prefer-arrow/prefer-arrow-functions': [
|
|
79
|
-
'error',
|
|
80
|
-
{
|
|
81
|
-
disallowPrototype: false,
|
|
82
|
-
singleReturnOnly: true,
|
|
83
|
-
classPropertiesAllowed: false,
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
|
|
87
76
|
'eslint-comments/no-unused-disable': 'error',
|
|
88
77
|
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
|
|
89
78
|
|
package/src/presets/import.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
...airbnbImports
|
|
8
|
-
} = require('eslint-config-airbnb-base/rules/imports');
|
|
1
|
+
import airbnbImportsRules from 'eslint-config-airbnb-base/rules/imports';
|
|
2
|
+
import import_ from 'eslint-plugin-import';
|
|
3
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
4
|
+
import globals from 'globals';
|
|
5
|
+
|
|
6
|
+
const { env: _importsEnv, parserOptions: _importsParser, ...airbnbImports } = airbnbImportsRules;
|
|
9
7
|
|
|
10
8
|
/** @type {import('eslint').Linter.Config[]} */
|
|
11
|
-
|
|
9
|
+
export default [
|
|
12
10
|
{
|
|
13
11
|
plugins: {
|
|
14
12
|
import: import_,
|
package/src/presets/mdx.js
CHANGED
package/src/presets/nest.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import typescript from '@typescript-eslint/eslint-plugin';
|
|
2
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
3
3
|
|
|
4
4
|
/** @type {import('eslint').Linter.Config[]} */
|
|
5
|
-
|
|
5
|
+
export default [
|
|
6
6
|
{
|
|
7
7
|
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
|
|
8
8
|
|
package/src/presets/utility.js
CHANGED
package/src/presets/voiceflow.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { voiceflowConfig } from '@voiceflow/eslint-plugin';
|
|
2
2
|
|
|
3
3
|
/** @type {import('eslint').Linter.Config[]} */
|
|
4
|
-
|
|
4
|
+
export default [
|
|
5
5
|
{
|
|
6
6
|
plugins: {
|
|
7
7
|
'@voiceflow': voiceflowConfig,
|