@vitus-labs/tools-lint 1.5.1 → 1.5.2-alpha.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.
package/lib/index.d.ts DELETED
@@ -1,111 +0,0 @@
1
- declare type Config = Partial<{
2
- rootPath: string;
3
- projects: string[];
4
- extensions: string[];
5
- graphqlClient: 'apollo' | 'relay' | 'lokka' | 'fraql' | 'literal';
6
- scope: string;
7
- config: Record<string, any>;
8
- }>;
9
-
10
- export declare const createEslint: (options?: Options) => ({ rootPath, projects, extensions, graphqlClient, scope, config, }?: Config) => {
11
- root: boolean;
12
- env: {
13
- browser: boolean;
14
- node: boolean;
15
- es2022: boolean;
16
- };
17
- globals: {
18
- __NODE__: string;
19
- __WEB__: string;
20
- __BROWSER__: string;
21
- __NATIVE__: string;
22
- __CLIENT__: string;
23
- };
24
- parser: string;
25
- plugins: string[];
26
- parserOptions: {
27
- tsconfigRootDir: string;
28
- project: boolean;
29
- ecmaFeatures: {
30
- jsx: boolean;
31
- };
32
- ecmaVersion: string;
33
- sourceType: string;
34
- };
35
- extends: string[];
36
- settings: {
37
- [x: string]: any;
38
- };
39
- rules: {
40
- 'no-unused-vars': string;
41
- 'no-useless-constructor': string;
42
- 'no-shadow': string;
43
- 'no-use-before-define': string;
44
- 'no-param-reassign': (string | {
45
- props: boolean;
46
- ignorePropertyModificationsFor: string[];
47
- })[];
48
- };
49
- overrides: Record<string, any>[];
50
- } & Record<string, any>;
51
-
52
- export declare const eslint: {
53
- root: boolean;
54
- env: {
55
- browser: boolean;
56
- node: boolean;
57
- es2022: boolean;
58
- };
59
- globals: {
60
- __NODE__: string;
61
- __WEB__: string;
62
- __BROWSER__: string;
63
- __NATIVE__: string;
64
- __CLIENT__: string;
65
- };
66
- parser: string;
67
- plugins: string[];
68
- parserOptions: {
69
- tsconfigRootDir: string;
70
- project: boolean;
71
- ecmaFeatures: {
72
- jsx: boolean;
73
- };
74
- ecmaVersion: string;
75
- sourceType: string;
76
- };
77
- extends: string[];
78
- settings: {
79
- [x: string]: any;
80
- };
81
- rules: {
82
- 'no-unused-vars': string;
83
- 'no-useless-constructor': string;
84
- 'no-shadow': string;
85
- 'no-use-before-define': string;
86
- 'no-param-reassign': (string | {
87
- props: boolean;
88
- ignorePropertyModificationsFor: string[];
89
- })[];
90
- };
91
- overrides: Record<string, any>[];
92
- } & Record<string, any>;
93
-
94
- declare type Options = Partial<{
95
- import: boolean;
96
- react: boolean;
97
- typescript: boolean;
98
- a11y: boolean;
99
- markdown: boolean;
100
- prettier: boolean;
101
- graphql: boolean;
102
- storybook: boolean;
103
- jest: boolean;
104
- }>;
105
-
106
- export declare const styles: {
107
- processors: string[];
108
- extends: string[];
109
- };
110
-
111
- export { }
@@ -1,6 +0,0 @@
1
- import type { Options } from './types';
2
- declare const loadTsProjects: (projects: string[]) => string[];
3
- declare const loadPlugins: (options: Options) => string[];
4
- declare const loadExtendsConfigs: (options: Options) => string[];
5
- declare const extendObject: (condition: boolean | null | undefined, object?: Record<string, any>) => Record<string, any>;
6
- export { loadTsProjects, loadPlugins, loadExtendsConfigs, extendObject };
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/eslint/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,QAAA,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,aACY,CAAA;AAEtD,QAAA,MAAM,WAAW,GAAI,SAAS,OAAO,aAapC,CAAA;AAED,QAAA,MAAM,kBAAkB,GAAI,SAAS,OAAO,aAwB3C,CAAA;AAED,QAAA,MAAM,YAAY,GAChB,WAAW,OAAO,GAAG,IAAI,GAAG,SAAS,EACrC,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,KAC/B,MAAM,CAAC,MAAM,EAAE,GAAG,CAA8B,CAAA;AAEnD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAA"}
@@ -1,93 +0,0 @@
1
- import type { Options } from './types';
2
- type Config = Partial<{
3
- rootPath: string;
4
- projects: string[];
5
- extensions: string[];
6
- graphqlClient: 'apollo' | 'relay' | 'lokka' | 'fraql' | 'literal';
7
- scope: string;
8
- config: Record<string, any>;
9
- }>;
10
- declare const createEslint: (options?: Options) => ({ rootPath, projects, extensions, graphqlClient, scope, config, }?: Config) => {
11
- root: boolean;
12
- env: {
13
- browser: boolean;
14
- node: boolean;
15
- es2022: boolean;
16
- };
17
- globals: {
18
- __NODE__: string;
19
- __WEB__: string;
20
- __BROWSER__: string;
21
- __NATIVE__: string;
22
- __CLIENT__: string;
23
- };
24
- parser: string;
25
- plugins: string[];
26
- parserOptions: {
27
- tsconfigRootDir: string;
28
- project: boolean;
29
- ecmaFeatures: {
30
- jsx: boolean;
31
- };
32
- ecmaVersion: string;
33
- sourceType: string;
34
- };
35
- extends: string[];
36
- settings: {
37
- [x: string]: any;
38
- };
39
- rules: {
40
- 'no-unused-vars': string;
41
- 'no-useless-constructor': string;
42
- 'no-shadow': string;
43
- 'no-use-before-define': string;
44
- 'no-param-reassign': (string | {
45
- props: boolean;
46
- ignorePropertyModificationsFor: string[];
47
- })[];
48
- };
49
- overrides: Record<string, any>[];
50
- } & Record<string, any>;
51
- export { createEslint };
52
- declare const _default: {
53
- root: boolean;
54
- env: {
55
- browser: boolean;
56
- node: boolean;
57
- es2022: boolean;
58
- };
59
- globals: {
60
- __NODE__: string;
61
- __WEB__: string;
62
- __BROWSER__: string;
63
- __NATIVE__: string;
64
- __CLIENT__: string;
65
- };
66
- parser: string;
67
- plugins: string[];
68
- parserOptions: {
69
- tsconfigRootDir: string;
70
- project: boolean;
71
- ecmaFeatures: {
72
- jsx: boolean;
73
- };
74
- ecmaVersion: string;
75
- sourceType: string;
76
- };
77
- extends: string[];
78
- settings: {
79
- [x: string]: any;
80
- };
81
- rules: {
82
- 'no-unused-vars': string;
83
- 'no-useless-constructor': string;
84
- 'no-shadow': string;
85
- 'no-use-before-define': string;
86
- 'no-param-reassign': (string | {
87
- props: boolean;
88
- ignorePropertyModificationsFor: string[];
89
- })[];
90
- };
91
- overrides: Record<string, any>[];
92
- } & Record<string, any>;
93
- export default _default;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/eslint/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,KAAK,MAAM,GAAG,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,aAAa,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B,CAAC,CAAA;AAEF,QAAA,MAAM,YAAY,GACf,UAAU,OAAO,MACjB,oEAOE,MAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA6Qb,CAAA;AAEH,OAAO,EAAE,YAAY,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACvB,wBAA+B"}
@@ -1,11 +0,0 @@
1
- export type Options = Partial<{
2
- import: boolean;
3
- react: boolean;
4
- typescript: boolean;
5
- a11y: boolean;
6
- markdown: boolean;
7
- prettier: boolean;
8
- graphql: boolean;
9
- storybook: boolean;
10
- jest: boolean;
11
- }>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/eslint/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;CACd,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import eslint, { createEslint } from "./eslint";
2
- import styles from "./styles";
3
- export { eslint, styles, createEslint };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,iBAAgB;AAC/C,OAAO,MAAM,iBAAgB;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +0,0 @@
1
- declare const _default: {
2
- processors: string[];
3
- extends: string[];
4
- };
5
- export default _default;
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/styles.ts"],"names":[],"mappings":";;;;AAAA,wBAOC"}
@@ -1,317 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var lodash = require('lodash');
6
-
7
- const loadTsProjects = (projects) => projects.map((item) => `${item}/**/*/tsconfig.json`);
8
- const loadPlugins = (options) => {
9
- const RESULT = ['@typescript-eslint'];
10
- if (options.import)
11
- RESULT.push('import');
12
- if (options.react)
13
- RESULT.push('react');
14
- if (options.a11y)
15
- RESULT.push('jsx-a11y');
16
- if (options.storybook)
17
- RESULT.push('storybook');
18
- if (options.graphql)
19
- RESULT.push('graphql');
20
- if (options.markdown)
21
- RESULT.push('markdown');
22
- if (options.jest)
23
- RESULT.push('jest');
24
- if (options.prettier)
25
- RESULT.push('prettier');
26
- return RESULT;
27
- };
28
- const loadExtendsConfigs = (options) => {
29
- const RESULT = ['eslint:recommended'];
30
- if (options.import)
31
- RESULT.push('plugin:import/recommended', 'plugin:import/typescript');
32
- RESULT.push('plugin:@typescript-eslint/recommended-type-checked', 'plugin:@typescript-eslint/stylistic-type-checked', 'airbnb');
33
- if (options.react)
34
- RESULT.push('plugin:react/recommended', 'plugin:react-hooks/recommended');
35
- if (options.a11y)
36
- RESULT.push('plugin:jsx-a11y/recommended');
37
- if (options.storybook)
38
- RESULT.push('plugin:storybook/recommended');
39
- if (options.prettier)
40
- RESULT.push('plugin:prettier/recommended', 'prettier');
41
- if (options.jest)
42
- RESULT.push('plugin:jest/all');
43
- return RESULT;
44
- };
45
- const extendObject = (condition, object = {}) => (condition ? object : {});
46
-
47
- const createEslint = (options) => ({ rootPath = './', projects = ['packages', 'apps', 'tools', 'features'], extensions = [], graphqlClient = undefined, scope, config, } = {}) => {
48
- const defaultOptions = {
49
- react: true,
50
- typescript: true,
51
- import: true,
52
- a11y: true,
53
- prettier: true,
54
- markdown: true,
55
- graphql: false,
56
- storybook: true,
57
- jest: false,
58
- };
59
- const finalOptions = lodash.merge(defaultOptions, options);
60
- const optionsConfig = lodash.omit(finalOptions, 'jest');
61
- const extensionsConfig = [
62
- '.js',
63
- '.jsx',
64
- '.ts',
65
- '.tsx',
66
- '.d.ts',
67
- ...extensions,
68
- ];
69
- const tsProjects = loadTsProjects(projects);
70
- const pluginsConfig = loadPlugins(optionsConfig);
71
- const extendsConfig = loadExtendsConfigs(optionsConfig);
72
- const OVERRIDES = [
73
- // --------------------------------------------------
74
- // SCRIPTS
75
- // --------------------------------------------------
76
- {
77
- files: ['**/bin/*.js'],
78
- rules: {
79
- '@typescript-eslint/no-var-requires': 'off',
80
- 'no-console': 'off',
81
- ...extendObject(finalOptions.import, {
82
- 'import/no-extraneous-dependencies': [
83
- 'error',
84
- {
85
- peerDependencies: true,
86
- },
87
- ],
88
- }),
89
- },
90
- },
91
- // --------------------------------------------------
92
- // STORIES of STORYBOOK
93
- // --------------------------------------------------
94
- {
95
- files: [
96
- '**/__stories__/**',
97
- '*.stories.*',
98
- '*stories.*',
99
- '*.storyOf.*',
100
- ],
101
- extends: loadExtendsConfigs(optionsConfig),
102
- rules: {
103
- '@typescript-eslint/explicit-module-boundary-types': 'off',
104
- 'no-console': 'off',
105
- ...extendObject(finalOptions.import, {
106
- 'import/no-extraneous-dependencies': [
107
- 'error',
108
- {
109
- devDependencies: true,
110
- optionalDependencies: true,
111
- peerDependencies: true,
112
- },
113
- ],
114
- }),
115
- },
116
- },
117
- // --------------------------------------------------
118
- // MARKDOWN
119
- // --------------------------------------------------
120
- extendObject(finalOptions.markdown, {
121
- files: ['**/*.md', '**/*.mdx'],
122
- processor: 'markdown/markdown',
123
- }),
124
- // --------------------------------------------------
125
- // CONFIGURATION FILES
126
- // --------------------------------------------------
127
- {
128
- files: [
129
- 'eslint.config.js',
130
- 'prettier.config.js',
131
- '.config.js',
132
- '.config.mjs',
133
- ],
134
- rules: {
135
- ...extendObject(finalOptions.import, {
136
- 'import/no-extraneous-dependencies': [
137
- 'error',
138
- {
139
- devDependencies: true,
140
- optionalDependencies: true,
141
- peerDependencies: true,
142
- },
143
- ],
144
- }),
145
- },
146
- },
147
- // --------------------------------------------------
148
- // TESTS
149
- // --------------------------------------------------
150
- extendObject(finalOptions.jest, {
151
- files: ['**/__tests__/**', '**/__specs__/**', '*.spec.*', '*.test.*'],
152
- plugins: loadPlugins(optionsConfig),
153
- env: {
154
- 'jest/globals': true,
155
- },
156
- extends: loadExtendsConfigs(optionsConfig),
157
- settings: {
158
- jest: {
159
- version: 27,
160
- },
161
- },
162
- rules: {
163
- '@typescript-eslint/explicit-module-boundary-types': 'off',
164
- 'no-console': 'off',
165
- ...extendObject(finalOptions.import, {
166
- 'import/no-extraneous-dependencies': [
167
- 'error',
168
- {
169
- devDependencies: true,
170
- optionalDependencies: true,
171
- peerDependencies: true,
172
- },
173
- ],
174
- }),
175
- },
176
- }),
177
- ];
178
- const CONFIG = {
179
- root: true,
180
- env: {
181
- browser: true,
182
- node: true,
183
- es2022: true,
184
- },
185
- globals: {
186
- __NODE__: 'readonly',
187
- __WEB__: 'readonly',
188
- __BROWSER__: 'readonly',
189
- __NATIVE__: 'readonly',
190
- __CLIENT__: 'readonly',
191
- },
192
- parser: '@typescript-eslint/parser',
193
- plugins: pluginsConfig,
194
- parserOptions: {
195
- tsconfigRootDir: rootPath,
196
- project: true,
197
- ecmaFeatures: {
198
- jsx: true,
199
- },
200
- ecmaVersion: 'latest',
201
- sourceType: 'module',
202
- },
203
- extends: extendsConfig,
204
- settings: {
205
- ...extendObject(finalOptions.import, {
206
- 'import/extensions': extensionsConfig,
207
- 'import/parsers': {
208
- '@typescript-eslint/parser': ['.ts', '.tsx'],
209
- },
210
- 'import/resolver': {
211
- node: {
212
- extensions: extensionsConfig,
213
- },
214
- ...extendObject(finalOptions.typescript, {
215
- typescript: {
216
- alwaysTryTypes: true,
217
- project: [...tsProjects, 'tsconfig.json'],
218
- },
219
- }),
220
- },
221
- ...extendObject(!!scope, { 'import/internal-regex': scope }),
222
- }),
223
- },
224
- rules: {
225
- 'no-unused-vars': 'off',
226
- 'no-useless-constructor': 'off',
227
- 'no-shadow': 'off',
228
- 'no-use-before-define': 'off', // is being used @typescript-eslint/no-use-before-define
229
- 'no-param-reassign': [
230
- 'error',
231
- { props: true, ignorePropertyModificationsFor: ['self'] },
232
- ],
233
- ...extendObject(finalOptions.typescript, {
234
- '@typescript-eslint/no-explicit-any': 'off',
235
- '@typescript-eslint/no-useless-constructor': 'error',
236
- '@typescript-eslint/explicit-function-return-type': 'off',
237
- '@typescript-eslint/no-unused-vars': 'error',
238
- '@typescript-eslint/member-delimiter-style': [
239
- 2,
240
- {
241
- multiline: {
242
- delimiter: 'none',
243
- requireLast: false,
244
- },
245
- singleline: {
246
- delimiter: 'semi',
247
- requireLast: false,
248
- },
249
- },
250
- ],
251
- }),
252
- // --------------------------------------------------
253
- // IMPORT rules
254
- // --------------------------------------------------
255
- ...extendObject(finalOptions.import, {
256
- 'import/prefer-default-export': 'off',
257
- 'import/extensions': [
258
- 'error',
259
- 'ignorePackages',
260
- {
261
- js: 'never',
262
- jsx: 'never',
263
- ts: 'never',
264
- tsx: 'never',
265
- },
266
- ],
267
- }),
268
- // --------------------------------------------------
269
- // REACT rules
270
- // --------------------------------------------------
271
- ...extendObject(finalOptions.react, {
272
- 'react/require-default-props': 'off',
273
- 'react/prop-types': 'off',
274
- 'react/jsx-props-no-spreading': 'off',
275
- 'react/function-component-definition': 'off',
276
- 'react/jsx-filename-extension': [1, { extensions: extensionsConfig }],
277
- }),
278
- // --------------------------------------------------
279
- // GRAPHQL rules
280
- // --------------------------------------------------
281
- ...extendObject(finalOptions.graphql, {
282
- 'graphql/template-strings': [
283
- 'error',
284
- {
285
- // Import default settings for your GraphQL client. Supported values:
286
- // 'apollo', 'relay', 'lokka', 'fraql', 'literal'
287
- env: graphqlClient ?? 'literal',
288
- // no need to specify schema here, it will be automatically determined using .graphqlconfig
289
- },
290
- ],
291
- }),
292
- // --------------------------------------------------
293
- // PRETTIER rules
294
- // --------------------------------------------------
295
- ...extendObject(finalOptions.prettier, {
296
- 'prettier/prettier': 'error',
297
- }),
298
- },
299
- overrides: lodash.filter(OVERRIDES, (item) => !lodash.isEmpty(item)),
300
- };
301
- return lodash.merge(CONFIG, config);
302
- };
303
- var index = createEslint()();
304
-
305
- var styles = {
306
- processors: ['stylelint-processor-styled-components'],
307
- extends: [
308
- 'stylelint-config-recommended',
309
- 'stylelint-config-styled-components',
310
- 'stylelint-config-prettier',
311
- ],
312
- };
313
-
314
- exports.createEslint = createEslint;
315
- exports.eslint = index;
316
- exports.styles = styles;
317
- //# sourceMappingURL=vitus-tools-lint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vitus-tools-lint.js","sources":["../src/eslint/helpers.ts","../src/eslint/index.ts","../src/styles.ts"],"sourcesContent":["import type { Options } from './types'\n\nconst loadTsProjects = (projects: string[]) =>\n projects.map((item) => `${item}/**/*/tsconfig.json`)\n\nconst loadPlugins = (options: Options) => {\n const RESULT = ['@typescript-eslint']\n\n if (options.import) RESULT.push('import')\n if (options.react) RESULT.push('react')\n if (options.a11y) RESULT.push('jsx-a11y')\n if (options.storybook) RESULT.push('storybook')\n if (options.graphql) RESULT.push('graphql')\n if (options.markdown) RESULT.push('markdown')\n if (options.jest) RESULT.push('jest')\n if (options.prettier) RESULT.push('prettier')\n\n return RESULT\n}\n\nconst loadExtendsConfigs = (options: Options) => {\n const RESULT: string[] = ['eslint:recommended']\n\n if (options.import)\n RESULT.push('plugin:import/recommended', 'plugin:import/typescript')\n\n RESULT.push(\n 'plugin:@typescript-eslint/recommended-type-checked',\n 'plugin:@typescript-eslint/stylistic-type-checked',\n 'airbnb',\n )\n\n if (options.react)\n RESULT.push('plugin:react/recommended', 'plugin:react-hooks/recommended')\n\n if (options.a11y) RESULT.push('plugin:jsx-a11y/recommended')\n\n if (options.storybook) RESULT.push('plugin:storybook/recommended')\n\n if (options.prettier) RESULT.push('plugin:prettier/recommended', 'prettier')\n\n if (options.jest) RESULT.push('plugin:jest/all')\n\n return RESULT\n}\n\nconst extendObject = (\n condition: boolean | null | undefined,\n object: Record<string, any> = {},\n): Record<string, any> => (condition ? object : {})\n\nexport { loadTsProjects, loadPlugins, loadExtendsConfigs, extendObject }\n","import { filter, merge, omit, isEmpty } from 'lodash'\nimport {\n loadTsProjects,\n loadPlugins,\n loadExtendsConfigs,\n extendObject,\n} from './helpers'\nimport type { Options } from './types'\n\ntype Config = Partial<{\n rootPath: string\n projects: string[]\n extensions: string[]\n graphqlClient: 'apollo' | 'relay' | 'lokka' | 'fraql' | 'literal'\n scope: string\n config: Record<string, any>\n}>\n\nconst createEslint =\n (options?: Options) =>\n ({\n rootPath = './',\n projects = ['packages', 'apps', 'tools', 'features'],\n extensions = [],\n graphqlClient = undefined,\n scope,\n config,\n }: Config = {}) => {\n const defaultOptions: Options = {\n react: true,\n typescript: true,\n import: true,\n a11y: true,\n prettier: true,\n markdown: true,\n graphql: false,\n storybook: true,\n jest: false,\n }\n const finalOptions = merge(defaultOptions, options)\n const optionsConfig = omit(finalOptions, 'jest')\n\n const extensionsConfig = [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n '.d.ts',\n ...extensions,\n ]\n const tsProjects: ReturnType<typeof loadTsProjects> =\n loadTsProjects(projects)\n\n const pluginsConfig = loadPlugins(optionsConfig)\n const extendsConfig = loadExtendsConfigs(optionsConfig)\n\n const OVERRIDES = [\n // --------------------------------------------------\n // SCRIPTS\n // --------------------------------------------------\n {\n files: ['**/bin/*.js'],\n rules: {\n '@typescript-eslint/no-var-requires': 'off',\n 'no-console': 'off',\n ...extendObject(finalOptions.import, {\n 'import/no-extraneous-dependencies': [\n 'error',\n {\n peerDependencies: true,\n },\n ],\n }),\n },\n },\n\n // --------------------------------------------------\n // STORIES of STORYBOOK\n // --------------------------------------------------\n {\n files: [\n '**/__stories__/**',\n '*.stories.*',\n '*stories.*',\n '*.storyOf.*',\n ],\n extends: loadExtendsConfigs(optionsConfig),\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n 'no-console': 'off',\n ...extendObject(finalOptions.import, {\n 'import/no-extraneous-dependencies': [\n 'error',\n {\n devDependencies: true,\n optionalDependencies: true,\n peerDependencies: true,\n },\n ],\n }),\n },\n },\n\n // --------------------------------------------------\n // MARKDOWN\n // --------------------------------------------------\n extendObject(finalOptions.markdown, {\n files: ['**/*.md', '**/*.mdx'],\n processor: 'markdown/markdown',\n }),\n\n // --------------------------------------------------\n // CONFIGURATION FILES\n // --------------------------------------------------\n {\n files: [\n 'eslint.config.js',\n 'prettier.config.js',\n '.config.js',\n '.config.mjs',\n ],\n rules: {\n ...extendObject(finalOptions.import, {\n 'import/no-extraneous-dependencies': [\n 'error',\n {\n devDependencies: true,\n optionalDependencies: true,\n peerDependencies: true,\n },\n ],\n }),\n },\n },\n\n // --------------------------------------------------\n // TESTS\n // --------------------------------------------------\n extendObject(finalOptions.jest, {\n files: ['**/__tests__/**', '**/__specs__/**', '*.spec.*', '*.test.*'],\n plugins: loadPlugins(optionsConfig),\n env: {\n 'jest/globals': true,\n },\n extends: loadExtendsConfigs(optionsConfig),\n settings: {\n jest: {\n version: 27,\n },\n },\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n 'no-console': 'off',\n ...extendObject(finalOptions.import, {\n 'import/no-extraneous-dependencies': [\n 'error',\n {\n devDependencies: true,\n optionalDependencies: true,\n peerDependencies: true,\n },\n ],\n }),\n },\n }),\n ]\n\n const CONFIG = {\n root: true,\n env: {\n browser: true,\n node: true,\n es2022: true,\n },\n globals: {\n __NODE__: 'readonly',\n __WEB__: 'readonly',\n __BROWSER__: 'readonly',\n __NATIVE__: 'readonly',\n __CLIENT__: 'readonly',\n },\n parser: '@typescript-eslint/parser',\n plugins: pluginsConfig,\n parserOptions: {\n tsconfigRootDir: rootPath,\n project: true,\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 'latest',\n sourceType: 'module',\n },\n extends: extendsConfig,\n settings: {\n ...extendObject(finalOptions.import, {\n 'import/extensions': extensionsConfig,\n 'import/parsers': {\n '@typescript-eslint/parser': ['.ts', '.tsx'],\n },\n 'import/resolver': {\n node: {\n extensions: extensionsConfig,\n },\n ...extendObject(finalOptions.typescript, {\n typescript: {\n alwaysTryTypes: true,\n project: [...tsProjects, 'tsconfig.json'],\n },\n }),\n },\n ...extendObject(!!scope, { 'import/internal-regex': scope }),\n }),\n },\n rules: {\n 'no-unused-vars': 'off',\n 'no-useless-constructor': 'off',\n 'no-shadow': 'off',\n 'no-use-before-define': 'off', // is being used @typescript-eslint/no-use-before-define\n 'no-param-reassign': [\n 'error',\n { props: true, ignorePropertyModificationsFor: ['self'] },\n ],\n ...extendObject(finalOptions.typescript, {\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-useless-constructor': 'error',\n '@typescript-eslint/explicit-function-return-type': 'off',\n '@typescript-eslint/no-unused-vars': 'error',\n '@typescript-eslint/member-delimiter-style': [\n 2,\n {\n multiline: {\n delimiter: 'none',\n requireLast: false,\n },\n singleline: {\n delimiter: 'semi',\n requireLast: false,\n },\n },\n ],\n }),\n\n // --------------------------------------------------\n // IMPORT rules\n // --------------------------------------------------\n ...extendObject(finalOptions.import, {\n 'import/prefer-default-export': 'off',\n 'import/extensions': [\n 'error',\n 'ignorePackages',\n {\n js: 'never',\n jsx: 'never',\n ts: 'never',\n tsx: 'never',\n },\n ],\n }),\n\n // --------------------------------------------------\n // REACT rules\n // --------------------------------------------------\n ...extendObject(finalOptions.react, {\n 'react/require-default-props': 'off',\n 'react/prop-types': 'off',\n 'react/jsx-props-no-spreading': 'off',\n 'react/function-component-definition': 'off',\n 'react/jsx-filename-extension': [1, { extensions: extensionsConfig }],\n }),\n\n // --------------------------------------------------\n // GRAPHQL rules\n // --------------------------------------------------\n ...extendObject(finalOptions.graphql, {\n 'graphql/template-strings': [\n 'error',\n {\n // Import default settings for your GraphQL client. Supported values:\n // 'apollo', 'relay', 'lokka', 'fraql', 'literal'\n env: graphqlClient ?? 'literal',\n // no need to specify schema here, it will be automatically determined using .graphqlconfig\n },\n ],\n }),\n\n // --------------------------------------------------\n // PRETTIER rules\n // --------------------------------------------------\n ...extendObject(finalOptions.prettier, {\n 'prettier/prettier': 'error',\n }),\n },\n overrides: filter(OVERRIDES, (item) => !isEmpty(item)),\n }\n\n return merge(CONFIG, config)\n }\n\nexport { createEslint }\nexport default createEslint()()\n","export default {\n processors: ['stylelint-processor-styled-components'],\n extends: [\n 'stylelint-config-recommended',\n 'stylelint-config-styled-components',\n 'stylelint-config-prettier',\n ],\n}\n"],"names":["merge","omit","filter","isEmpty"],"mappings":";;;;;;AAEA,MAAM,cAAc,GAAG,CAAC,QAAkB,KACxC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,CAAA,mBAAA,CAAqB,CAAC;AAEtD,MAAM,WAAW,GAAG,CAAC,OAAgB,KAAI;AACvC,IAAA,MAAM,MAAM,GAAG,CAAC,oBAAoB,CAAC;IAErC,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