@nfq/eslint-config 4.0.0-beta.12 → 4.0.0-beta.13
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/dist/esm/index.js +30 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/rules/storybook/overrides/resets.js +14 -0
- package/dist/esm/rules/storybook/overrides/resets.js.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +1261 -0
- package/types/rules/index.d.ts +1 -0
- package/types/rules/storybook/index.d.ts +1 -0
- package/types/rules/storybook/overrides/index.d.ts +1 -0
- package/types/rules/storybook/overrides/resets.d.ts +11 -0
package/dist/esm/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { commonPluginRules } from './rules/common/plugins/index.js';
|
|
|
9
9
|
import { commonEslintRules } from './rules/common/eslint/index.js';
|
|
10
10
|
import { typescriptRuleResets } from './rules/typescript/overrides/index.js';
|
|
11
11
|
import { tsRules } from './rules/typescript/plugins/index.js';
|
|
12
|
+
import { storybookResets } from './rules/storybook/overrides/resets.js';
|
|
12
13
|
import { cypressResets } from './rules/cypress/overrides/resets.js';
|
|
13
14
|
import { cypressPluginRules } from './rules/cypress/plugins/index.js';
|
|
14
15
|
|
|
@@ -66,6 +67,35 @@ const NFQEslintConfig = [settings, {
|
|
|
66
67
|
...tsRules,
|
|
67
68
|
...typescriptRuleResets
|
|
68
69
|
}
|
|
70
|
+
}, {
|
|
71
|
+
files: ['**/*.stories.{ts,cts,mts,tsx}'],
|
|
72
|
+
languageOptions: {
|
|
73
|
+
ecmaVersion: 'latest',
|
|
74
|
+
globals,
|
|
75
|
+
parser: tsParser,
|
|
76
|
+
parserOptions: {
|
|
77
|
+
ecmaFeatures: {
|
|
78
|
+
jsx: true
|
|
79
|
+
},
|
|
80
|
+
ecmaVersion: 'latest',
|
|
81
|
+
project: '**/tsconfig*.json'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
linterOptions: {
|
|
85
|
+
reportUnusedDisableDirectives: 'error',
|
|
86
|
+
reportUnusedInlineConfigs: 'error'
|
|
87
|
+
},
|
|
88
|
+
name: 'NFQ ESLint TS Story Config',
|
|
89
|
+
plugins: tsPlugins,
|
|
90
|
+
rules: {
|
|
91
|
+
...commonEslintRules,
|
|
92
|
+
...commonPluginRules,
|
|
93
|
+
...nodeRules,
|
|
94
|
+
...reactPluginRules,
|
|
95
|
+
...tsRules,
|
|
96
|
+
...typescriptRuleResets,
|
|
97
|
+
...storybookResets
|
|
98
|
+
}
|
|
69
99
|
}, {
|
|
70
100
|
files: ['**/*.cy.{ts,cts,mts,tsx}'],
|
|
71
101
|
languageOptions: {
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import * as tsParser from '@typescript-eslint/parser';\n\nimport {\n commonEslintRules,\n commonPluginRules,\n cypressPluginRules,\n cypressResets,\n nodeRules,\n reactPluginRules,\n tsRules,\n typescriptRuleResets\n} from './rules';\nimport {globals} from './settings/globals';\nimport {plugins} from './settings/plugins';\nimport {settings} from './settings/settings';\nimport {tsPlugins} from './settings/tsPlugins';\n\nexport const NFQEslintConfig = [\n settings,\n {\n files: ['**/*.{js,cjs,mjs,jsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint JS Config',\n plugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules\n }\n },\n {\n files: ['**/*.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint TS Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets\n }\n },\n {\n files: ['**/*.cy.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint Cypress Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets,\n ...cypressPluginRules,\n ...cypressResets\n }\n }\n];\n\nexport {globals, plugins, settings, tsPlugins};"],"names":["NFQEslintConfig","settings","files","languageOptions","ecmaVersion","globals","parser","tsParser","parserOptions","ecmaFeatures","jsx","project","linterOptions","reportUnusedDisableDirectives","reportUnusedInlineConfigs","name","plugins","rules","commonEslintRules","commonPluginRules","nodeRules","reactPluginRules","tsPlugins","tsRules","typescriptRuleResets","cypressPluginRules","cypressResets"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import * as tsParser from '@typescript-eslint/parser';\n\nimport {\n commonEslintRules,\n commonPluginRules,\n cypressPluginRules,\n cypressResets,\n nodeRules,\n reactPluginRules,\n storybookResets,\n tsRules,\n typescriptRuleResets\n} from './rules';\nimport {globals} from './settings/globals';\nimport {plugins} from './settings/plugins';\nimport {settings} from './settings/settings';\nimport {tsPlugins} from './settings/tsPlugins';\n\nexport const NFQEslintConfig = [\n settings,\n {\n files: ['**/*.{js,cjs,mjs,jsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint JS Config',\n plugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules\n }\n },\n {\n files: ['**/*.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint TS Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets\n }\n },\n {\n files: ['**/*.stories.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint TS Story Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets,\n ...storybookResets\n }\n },\n {\n files: ['**/*.cy.{ts,cts,mts,tsx}'],\n languageOptions: {\n ecmaVersion: 'latest',\n globals,\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {jsx: true},\n ecmaVersion: 'latest',\n project: '**/tsconfig*.json'\n }\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n reportUnusedInlineConfigs: 'error'\n },\n name: 'NFQ ESLint Cypress Config',\n plugins: tsPlugins,\n rules: {\n ...commonEslintRules,\n ...commonPluginRules,\n ...nodeRules,\n ...reactPluginRules,\n ...tsRules,\n ...typescriptRuleResets,\n ...cypressPluginRules,\n ...cypressResets\n }\n }\n];\n\nexport {globals, plugins, settings, tsPlugins};"],"names":["NFQEslintConfig","settings","files","languageOptions","ecmaVersion","globals","parser","tsParser","parserOptions","ecmaFeatures","jsx","project","linterOptions","reportUnusedDisableDirectives","reportUnusedInlineConfigs","name","plugins","rules","commonEslintRules","commonPluginRules","nodeRules","reactPluginRules","tsPlugins","tsRules","typescriptRuleResets","storybookResets","cypressPluginRules","cypressResets"],"mappings":";;;;;;;;;;;;;;;AAkBO,MAAMA,eAAe,GAAG,CAC3BC,QAAQ,EACR;EACIC,KAAK,EAAE,CAAC,uBAAuB,CAAC;AAChCC,EAAAA,eAAe,EAAE;AACbC,IAAAA,WAAW,EAAE,QAAQ;IACrBC,OAAO;AACPC,IAAAA,MAAM,EAAEC,QAAQ;AAChBC,IAAAA,aAAa,EAAE;AACXC,MAAAA,YAAY,EAAE;AAACC,QAAAA,GAAG,EAAE;OAAK;AACzBN,MAAAA,WAAW,EAAE,QAAQ;AACrBO,MAAAA,OAAO,EAAE;AACb;GACH;AACDC,EAAAA,aAAa,EAAE;AACXC,IAAAA,6BAA6B,EAAE,OAAO;AACtCC,IAAAA,yBAAyB,EAAE;GAC9B;AACDC,EAAAA,IAAI,EAAE,sBAAsB;EAC5BC,OAAO;AACPC,EAAAA,KAAK,EAAE;AACH,IAAA,GAAGC,iBAAiB;AACpB,IAAA,GAAGC,iBAAiB;AACpB,IAAA,GAAGC,SAAS;IACZ,GAAGC;AACP;AACJ,CAAC,EACD;EACInB,KAAK,EAAE,CAAC,uBAAuB,CAAC;AAChCC,EAAAA,eAAe,EAAE;AACbC,IAAAA,WAAW,EAAE,QAAQ;IACrBC,OAAO;AACPC,IAAAA,MAAM,EAAEC,QAAQ;AACh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EAAAA,eAAe,EAAE;AACbC,IAAAA,WAAW,EAAE,QAAQ;IACrBC,OAAO;AACPC,IAAAA,MAAM,EAAEC,QAAQ;AAChBC,IAAAA,aAAa,EAAE;AACXC,MAAAA,YAAY,EAAE;AAACC,QAAAA,GAAG,EAAE;OAAK;AACzBN,MAAAA,WAAW,EAAE,QAAQ;AACrBO,MAAAA,OAAO,EAAE;AACb;GACH;AACDC,EAAAA,aAAa,EAAE;AACXC,IAAAA,6BAA6B,EAAE,OAAO;AACtCC,IAAAA,yBAAyB,EAAE;GAC9B;AACDC,EAAAA,IAAI,EAAE,2BAA2B;AACjCC,EAAAA,OAAO,EAAEM,SAAS;AAClBL,EAAAA,KAAK,EAAE;AACH,IAAA,GAAGC,iBAAiB;AACpB,IAAA,GAAGC,iBAAiB;AACpB,IAAA,GAAGC,SAAS;AACZ,IAAA,GAAGC,gBAAgB;AACnB,IAAA,GAAGE,OAAO;AACV,IAAA,GAAGC,oBAAoB;AACvB,IAAA,GAAGE,kBAAkB;IACrB,GAAGC;AACP;AACJ,CAAC;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const storybookResets = {
|
|
2
|
+
'@nfq/component-file-structure': 'off',
|
|
3
|
+
'@stylistic/newline-per-chained-call': 'off',
|
|
4
|
+
'@typescript-eslint/no-unused-expression': 'off',
|
|
5
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
6
|
+
'max-lines': 'off',
|
|
7
|
+
'promise/always-return': 'off',
|
|
8
|
+
'promise/catch-or-return': 'off',
|
|
9
|
+
'promise/prefer-await-to-callbacks': 'off',
|
|
10
|
+
'promise/prefer-await-to-then': 'off'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { storybookResets };
|
|
14
|
+
//# sourceMappingURL=resets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resets.js","sources":["../../../../../src/rules/storybook/overrides/resets.ts"],"sourcesContent":["export const storybookResets = {\n '@nfq/component-file-structure': 'off',\n '@stylistic/newline-per-chained-call': 'off',\n '@typescript-eslint/no-unused-expression': 'off',\n '@typescript-eslint/no-unused-expressions': 'off',\n 'max-lines': 'off',\n 'promise/always-return': 'off',\n 'promise/catch-or-return': 'off',\n 'promise/prefer-await-to-callbacks': 'off',\n 'promise/prefer-await-to-then': 'off'\n};"],"names":["storybookResets"],"mappings":"AAAO,MAAMA,eAAe,GAAG;AAC3B,EAAA,+BAA+B,EAAE,KAAK;AACtC,EAAA,qCAAqC,EAAE,KAAK;AAC5C,EAAA,yCAAyC,EAAE,KAAK;AAChD,EAAA,0CAA0C,EAAE,KAAK;AACjD,EAAA,WAAW,EAAE,KAAK;AAClB,EAAA,uBAAuB,EAAE,KAAK;AAC9B,EAAA,yBAAyB,EAAE,KAAK;AAChC,EAAA,mCAAmC,EAAE,KAAK;AAC1C,EAAA,8BAA8B,EAAE;AACpC;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1653,6 +1653,18 @@ const tsRules = {
|
|
|
1653
1653
|
...nfqRules
|
|
1654
1654
|
};
|
|
1655
1655
|
|
|
1656
|
+
const storybookResets = {
|
|
1657
|
+
'@nfq/component-file-structure': 'off',
|
|
1658
|
+
'@stylistic/newline-per-chained-call': 'off',
|
|
1659
|
+
'@typescript-eslint/no-unused-expression': 'off',
|
|
1660
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
1661
|
+
'max-lines': 'off',
|
|
1662
|
+
'promise/always-return': 'off',
|
|
1663
|
+
'promise/catch-or-return': 'off',
|
|
1664
|
+
'promise/prefer-await-to-callbacks': 'off',
|
|
1665
|
+
'promise/prefer-await-to-then': 'off'
|
|
1666
|
+
};
|
|
1667
|
+
|
|
1656
1668
|
const globals = {
|
|
1657
1669
|
after: false,
|
|
1658
1670
|
afterEach: false,
|
|
@@ -5018,6 +5030,35 @@ const NFQEslintConfig = [settings, {
|
|
|
5018
5030
|
...tsRules,
|
|
5019
5031
|
...typescriptRuleResets
|
|
5020
5032
|
}
|
|
5033
|
+
}, {
|
|
5034
|
+
files: ['**/*.stories.{ts,cts,mts,tsx}'],
|
|
5035
|
+
languageOptions: {
|
|
5036
|
+
ecmaVersion: 'latest',
|
|
5037
|
+
globals,
|
|
5038
|
+
parser: tsParser__namespace,
|
|
5039
|
+
parserOptions: {
|
|
5040
|
+
ecmaFeatures: {
|
|
5041
|
+
jsx: true
|
|
5042
|
+
},
|
|
5043
|
+
ecmaVersion: 'latest',
|
|
5044
|
+
project: '**/tsconfig*.json'
|
|
5045
|
+
}
|
|
5046
|
+
},
|
|
5047
|
+
linterOptions: {
|
|
5048
|
+
reportUnusedDisableDirectives: 'error',
|
|
5049
|
+
reportUnusedInlineConfigs: 'error'
|
|
5050
|
+
},
|
|
5051
|
+
name: 'NFQ ESLint TS Story Config',
|
|
5052
|
+
plugins: tsPlugins,
|
|
5053
|
+
rules: {
|
|
5054
|
+
...commonEslintRules,
|
|
5055
|
+
...commonPluginRules,
|
|
5056
|
+
...nodeRules,
|
|
5057
|
+
...reactPluginRules,
|
|
5058
|
+
...tsRules,
|
|
5059
|
+
...typescriptRuleResets,
|
|
5060
|
+
...storybookResets
|
|
5061
|
+
}
|
|
5021
5062
|
}, {
|
|
5022
5063
|
files: ['**/*.cy.{ts,cts,mts,tsx}'],
|
|
5023
5064
|
languageOptions: {
|