-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
61 lines (54 loc) · 1.6 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import eslintConfigRightcapital from '@rightcapital/eslint-config';
import eslintPluginEslintPlugin from 'eslint-plugin-eslint-plugin';
const { config } = eslintConfigRightcapital.utils;
export default config(
{
/**
* NOTE:
* DO NOT put any other keys other than `ignores` in this object.
* see: https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
*/
ignores: [
// build output
'packages/*/lib',
'.github/actions/*/dist',
// E2E tests, they contains individual lint config and specific ESLint dependencies
'specs',
],
},
...eslintConfigRightcapital.configs.recommended,
// scripts
{
files: [
'packages/*/*.{js,cjs,mjs,ts,cts,mts}', // each package's top-level directory files
'scripts/**/*.{js,cjs,mjs}',
'.github/actions/**/*.{js,cjs,mjs}',
],
extends: [
...eslintConfigRightcapital.configs.script,
...eslintConfigRightcapital.configs.node,
],
},
// -----------------------
// package specific rules
// -----------------------
// @rightcapital/eslint-plugin
{
files: ['packages/eslint-plugin/**/*.ts'],
extends: [eslintPluginEslintPlugin.configs['flat/recommended']],
},
{
files: ['packages/eslint-plugin/src/helpers/test/*.ts'],
rules: {
'import-x/no-extraneous-dependencies': [
'error',
{ devDependencies: true },
],
},
},
// @rightcapital/lint-eslint-config-rules
{
files: ['packages/lint-eslint-config-rules/**/*.ts'],
extends: [...eslintConfigRightcapital.configs.script],
},
);