Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

77 changes: 0 additions & 77 deletions .eslintrc.base.json

This file was deleted.

57 changes: 57 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// @ts-check
import stylistic from '@stylistic/eslint-plugin';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
ignores: ['**/lib/**', '**/node_modules/**', 'build/**', 'samples/**'],
},
{
files: ['**/*.ts'],
languageOptions: {
globals: globals.node,
parser: tseslint.parser,
},
plugins: {
'@typescript-eslint': tseslint.plugin,
'@stylistic': stylistic,
},
rules: {
'@stylistic/semi': 'error',
'@stylistic/member-delimiter-style': ['error', {
multiline: { delimiter: 'semi', requireLast: true },
singleline: { delimiter: 'semi', requireLast: false },
multilineDetection: 'brackets',
}],
'indent': 'off',
'@stylistic/indent': ['warn', 'tab', { SwitchCase: 1 }],
'@typescript-eslint/no-floating-promises': 'error',
'no-extra-semi': 'warn',
'curly': 'warn',
'quotes': ['error', 'single', { allowTemplateLiterals: true }],
'eqeqeq': 'error',
'constructor-super': 'warn',
'prefer-const': ['warn', { destructuring: 'all' }],
'no-caller': 'warn',
'no-case-declarations': 'warn',
'no-debugger': 'warn',
'no-duplicate-case': 'warn',
'no-duplicate-imports': 'warn',
'no-eval': 'warn',
'no-async-promise-executor': 'warn',
'no-new-wrappers': 'warn',
'no-redeclare': 'off',
'no-sparse-arrays': 'warn',
'no-throw-literal': 'warn',
'no-unsafe-finally': 'warn',
'no-unused-labels': 'warn',
'no-restricted-globals': ['warn', 'name', 'length', 'event', 'closed', 'external', 'status', 'origin', 'orientation', 'context'],
'no-var': 'warn',
'@typescript-eslint/naming-convention': [
'warn',
{ selector: 'class', format: ['PascalCase'], leadingUnderscore: 'allow' },
],
},
}
);
2 changes: 0 additions & 2 deletions language-service/.eslintignore

This file was deleted.

8 changes: 0 additions & 8 deletions language-service/.eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions language-service/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import rootConfig from '../eslint.config.mjs';
import tseslint from 'typescript-eslint';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

export default tseslint.config(
...rootConfig,
{
languageOptions: {
parserOptions: {
projectService: {
defaultProject: path.join(__dirname, 'tsconfig.json'),
},
},
},
}
);
2 changes: 0 additions & 2 deletions lsif/.eslintignore

This file was deleted.

8 changes: 0 additions & 8 deletions lsif/.eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions lsif/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import rootConfig from '../eslint.config.mjs';
import tseslint from 'typescript-eslint';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

export default tseslint.config(
...rootConfig,
{
languageOptions: {
parserOptions: {
projectService: {
defaultProject: path.join(__dirname, 'tsconfig.json'),
},
},
},
}
);
8 changes: 0 additions & 8 deletions npm/.eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions npm/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import rootConfig from '../eslint.config.mjs';
import tseslint from 'typescript-eslint';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

export default tseslint.config(
...rootConfig,
{
languageOptions: {
parserOptions: {
projectService: {
defaultProject: path.join(__dirname, 'tsconfig.json'),
},
},
},
}
);
Loading
Loading