New rules

This commit is contained in:
Alex
2024-04-19 21:54:02 -04:00
parent fb50ede688
commit 003a43512c
9 changed files with 19 additions and 16 deletions

View File

@ -167,13 +167,7 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
},
overrides: [
{
files: [
'.eslintrc.js',
'*.config.js',
'index.js',
'babel.config.js',
'next.config.js',
],
files: ['.eslintrc.js', '.eslintrc.cjs', '*.config.js', 'index.js'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: {
'rules/restrict-template-expressions': off,
@ -186,7 +180,7 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
},
},
{
files: ['repl.ts'],
files: ['repl.ts', 'scripts/**/*.ts'],
rules: {
'no-console': off,
},

View File

@ -42,7 +42,15 @@ export const eslintRules: Partial<EslintRules> = {
'prefer-spread': warn,
'quote-props': [error, 'as-needed'],
'sort-imports': [warn, { ignoreDeclarationSort: true }],
'spaced-comment': [error, 'always', { markers: ['/', '#', '@'] }],
'spaced-comment': [
error,
'always',
{
markers: ['/', '#', '@'],
// allow /*@__PURE__*/
block: { exceptions: ['@'] },
},
],
complexity: [warn, { max: 100 }],
curly: [error, 'multi-line', 'consistent'],
eqeqeq: [error, 'smart'],