Add ESLint and lint a bunch

This commit is contained in:
Vanilagy
2024-12-01 17:33:54 +01:00
parent 3ae891842f
commit 6730e41c07
25 changed files with 3668 additions and 1584 deletions
+40
View File
@@ -0,0 +1,40 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
stylistic.configs.customize({
indent: 'tab',
quotes: 'single',
semi: true,
braceStyle: '1tbs',
}),
{
rules: {
'@stylistic/max-len': ['error', {
code: 120,
}],
'@typescript-eslint/no-empty-object-type': 'off',
},
},
{
ignores: [
'dist',
'build',
'api-sketch.ts',
'build.mjs',
'append-namespace.mjs',
'eslint.config.mjs',
]
}
);