mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 01:51:37 -04:00
68 lines
2.1 KiB
JavaScript
68 lines
2.1 KiB
JavaScript
import js from '@eslint/js'
|
|
import tseslint from 'typescript-eslint'
|
|
import lodash from 'eslint-plugin-lodash'
|
|
import unusedImports from 'eslint-plugin-unused-imports'
|
|
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
|
|
|
export default tseslint.config(
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
plugins: {
|
|
lodash,
|
|
'unused-imports': unusedImports,
|
|
'simple-import-sort': simpleImportSort,
|
|
},
|
|
languageOptions: {
|
|
parserOptions: {
|
|
project: ['./tsconfig.json', './tsconfig.test.json', 'tsconfig.eslint.json'],
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
globals: {
|
|
process: 'readonly',
|
|
console: 'readonly',
|
|
module: 'readonly',
|
|
require: 'readonly',
|
|
__dirname: 'readonly',
|
|
__filename: 'readonly',
|
|
Buffer: 'readonly',
|
|
global: 'readonly',
|
|
setTimeout: 'readonly',
|
|
clearTimeout: 'readonly',
|
|
setInterval: 'readonly',
|
|
clearInterval: 'readonly',
|
|
setImmediate: 'readonly',
|
|
clearImmediate: 'readonly',
|
|
URL: 'readonly',
|
|
URLSearchParams: 'readonly',
|
|
fetch: 'readonly',
|
|
WebSocket: 'readonly',
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-empty-object-type': 'error',
|
|
'@typescript-eslint/no-unsafe-function-type': 'error',
|
|
'@typescript-eslint/no-wrapper-object-types': 'error',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-extra-semi': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
'unused-imports/no-unused-imports': 'warn',
|
|
'no-constant-condition': 'off',
|
|
'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix'],
|
|
'lodash/import-scope': [2, 'member'],
|
|
'simple-import-sort/imports': 'error',
|
|
'simple-import-sort/exports': 'error',
|
|
},
|
|
},
|
|
{
|
|
ignores: ['dist', 'lib', 'coverage', 'eslint.config.mjs', 'jest.config.ts'],
|
|
},
|
|
)
|