2024-07-01 21:38:34 -05:00
|
|
|
import tsParser from '@typescript-eslint/parser';
|
|
|
|
import sharedConfig from '../shared/eslint.config.js';
|
|
|
|
|
|
|
|
export default [
|
|
|
|
...sharedConfig,
|
|
|
|
{
|
2024-07-18 20:05:34 -05:00
|
|
|
ignores: ['**/node_modules', 'built', '@types/**/*', 'migration'],
|
2024-07-01 21:38:34 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
|
|
languageOptions: {
|
|
|
|
parserOptions: {
|
|
|
|
parser: tsParser,
|
|
|
|
project: ['./tsconfig.json', './test/tsconfig.json'],
|
|
|
|
sourceType: 'module',
|
|
|
|
tsconfigRootDir: import.meta.dirname,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'import/order': ['warn', {
|
|
|
|
groups: [
|
|
|
|
'builtin',
|
|
|
|
'external',
|
|
|
|
'internal',
|
|
|
|
'parent',
|
|
|
|
'sibling',
|
|
|
|
'index',
|
|
|
|
'object',
|
|
|
|
'type',
|
|
|
|
],
|
|
|
|
pathGroups: [{
|
|
|
|
pattern: '@/**',
|
|
|
|
group: 'external',
|
|
|
|
position: 'after',
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
'no-restricted-globals': ['error', {
|
|
|
|
name: '__dirname',
|
|
|
|
message: 'Not in ESModule. Use `import.meta.url` instead.',
|
|
|
|
}, {
|
|
|
|
name: '__filename',
|
|
|
|
message: 'Not in ESModule. Use `import.meta.url` instead.',
|
|
|
|
}],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|