-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
58 lines (52 loc) · 1.2 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
import tseslint from 'typescript-eslint'
import eslintConfig from '@skyblock-finance/eslint-config'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
const root = (() => {
const cause = []
try {
// eslint-disable-next-line no-undef
const result = __dirname
if (result) return result
} catch (error) {
cause.push(error)
}
try {
const result = import.meta.dirname
if (result) return result
} catch (error) {
cause.push(error)
}
try {
const result = path.dirname(fileURLToPath(import.meta.url))
if (result) return result
} catch (error) {
cause.push(error)
}
throw new Error('could not determine project root', { cause })
})()
export default tseslint.config(
/**
* DO NOT ADD ANY OTHER KEYS TO THIS FIRST OBJECT
*
* @see {@link https://eslint.org/docs/latest/use/configure/ignore#ignoring-files}
*/
{
ignores: [
'**/dist/**',
'**/.turbo/**',
'.github/custom/cla-signatures.json',
'packages/schemas/data/*.json',
],
},
{
extends: [...eslintConfig.configs.default],
languageOptions: {
parserOptions: {
project: ['./tsconfig.json', './packages/*/tsconfig.json'],
tsconfigRootDir: root,
},
},
},
...eslintConfig.configs.json,
)