mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-12-03 05:10:04 +01:00
89 lines
2.5 KiB
JavaScript
89 lines
2.5 KiB
JavaScript
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import stylistic from '@stylistic/eslint-plugin';
|
|
import globals from 'globals';
|
|
|
|
export default tseslint.config(
|
|
js.configs.recommended,
|
|
tseslint.configs.recommended,
|
|
{
|
|
files: ['**/*.ts'],
|
|
plugins: {
|
|
'@stylistic': stylistic,
|
|
},
|
|
languageOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
},
|
|
linterOptions: {
|
|
reportUnusedDisableDirectives: 'off',
|
|
},
|
|
rules: {
|
|
'@stylistic/indent': [
|
|
'warn',
|
|
'tab',
|
|
{
|
|
SwitchCase: 1,
|
|
ignoredNodes: ['ConditionalExpression'],
|
|
},
|
|
],
|
|
'@stylistic/quotes': [
|
|
'warn',
|
|
'single',
|
|
{ allowTemplateLiterals: 'always', avoidEscape: true },
|
|
],
|
|
'@stylistic/linebreak-style': ['warn', 'unix'],
|
|
'@stylistic/max-len': ['warn', { code: 200 }],
|
|
'@stylistic/semi': ['warn', 'always'],
|
|
'@stylistic/keyword-spacing': ['warn', { before: true, after: true }],
|
|
'@stylistic/no-trailing-spaces': 'warn',
|
|
'@stylistic/no-multiple-empty-lines': ['warn', { max: 2 }],
|
|
'@stylistic/brace-style': ['warn', 'stroustrup'],
|
|
'@stylistic/eol-last': 'error',
|
|
radix: ['error'],
|
|
'@typescript-eslint/no-empty-object-type': ['warn', { allowInterfaces: 'with-single-extends' }],
|
|
camelcase: 'warn',
|
|
'no-unused-labels': 'error',
|
|
'no-new-wrappers': 'error',
|
|
'no-debugger': 'error',
|
|
'no-eval': 'error',
|
|
'no-redeclare': 'off',
|
|
'no-underscore-dangle': 'off',
|
|
'no-caller': 'error',
|
|
'no-console': [
|
|
'error',
|
|
{
|
|
allow: [
|
|
'log', 'warn', 'dir', 'timeLog', 'assert', 'clear', 'count', 'countReset', 'group', 'groupEnd',
|
|
'table', 'dirxml', 'error', 'groupCollapsed', 'Console', 'profile', 'profileEnd', 'timeStamp', 'context',
|
|
],
|
|
},
|
|
],
|
|
curly: ['warn', 'all'],
|
|
eqeqeq: ['error', 'smart'],
|
|
'guard-for-in': 'error',
|
|
'no-case-declarations': 'off',
|
|
'no-sparse-arrays': 'off',
|
|
'no-empty-pattern': 'off',
|
|
'no-cond-assign': 'off',
|
|
'no-unused-vars': 'off',
|
|
'prefer-const': 'off',
|
|
'id-denylist': 'off',
|
|
'id-match': 'off',
|
|
'no-empty': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/triple-slash-reference': 'off',
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
'no-constant-condition': 'off',
|
|
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
},
|
|
},
|
|
);
|