forked from oxidecomputer/mitos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
36 lines (33 loc) · 977 Bytes
/
Copy patheslint.config.mjs
File metadata and controls
36 lines (33 loc) · 977 Bytes
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
// @ts-check
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { includeIgnoreFile } from '@eslint/compat'
import eslint from '@eslint/js'
import reactHooks from 'eslint-plugin-react-hooks'
import tseslint from 'typescript-eslint'
const parentDir = path.dirname(fileURLToPath(import.meta.url))
const gitignorePath = path.resolve(parentDir, '.gitignore')
export default tseslint.config(
includeIgnoreFile(gitignorePath),
{
ignores: ['app/lib/core/**', 'app/lib/modules/**', 'app/lib/animation.ts'],
},
eslint.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
eqeqeq: 'error',
'no-param-reassign': 'error',
'no-return-assign': 'error',
},
},
)