You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
881 B
JavaScript
44 lines
881 B
JavaScript
import { defineConfig } from 'eslint/config';
|
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
import prettierPlugin from 'eslint-plugin-prettier';
|
|
import prettierConfig from 'eslint-config-prettier';
|
|
|
|
export default defineConfig([
|
|
{
|
|
ignores: ['dist/'],
|
|
},
|
|
|
|
...tsPlugin.configs['flat/strict-type-checked'].map(c => ({
|
|
...c,
|
|
files: ['**/*.ts'],
|
|
})),
|
|
|
|
...tsPlugin.configs['flat/stylistic-type-checked'].map(c => ({
|
|
...c,
|
|
files: ['**/*.ts'],
|
|
})),
|
|
|
|
|
|
|
|
{
|
|
files: ['**/*.ts'],
|
|
languageOptions: {
|
|
parserOptions: { project: true },
|
|
},
|
|
plugins: {
|
|
prettier: prettierPlugin,
|
|
},
|
|
rules: {
|
|
...prettierConfig.rules,
|
|
'prettier/prettier': 'error',
|
|
},
|
|
},
|
|
|
|
{
|
|
files: ['**/*.ts'],
|
|
rules: {
|
|
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
|
|
},
|
|
},
|
|
]);
|