-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import * as os from 'os' | ||
Check failure on line 1 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
import nodev20 from '@strv/eslint-config-node/v20' | ||
Check failure on line 2 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
import nodeopt from '@strv/eslint-config-node/optional' | ||
Check failure on line 3 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
import nodestyle from '@strv/eslint-config-node/style' | ||
Check failure on line 4 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
import ts from '@strv/eslint-config-typescript' | ||
Check failure on line 5 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
import tsoptional from '@strv/eslint-config-typescript/optional' | ||
Check failure on line 6 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
import tsstyle from '@strv/eslint-config-typescript/style' | ||
Check failure on line 7 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
import mocha from '@strv/eslint-config-mocha' | ||
Check failure on line 8 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
|
||
Check failure on line 9 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
const lbstyle = os.platform() === 'win32' ? 'windows' : 'unix' | ||
Check failure on line 10 in eslint.config.mjs GitHub Actions / verify (windows-2022, 18)
|
||
const globs = { | ||
mjs: '**/*.mjs', | ||
ts: '**/*.ts', | ||
tests: '**/*.test.ts', | ||
} | ||
|
||
/** @type {Array<import("eslint").Linter.FlatConfig>} */ | ||
const config = [ | ||
{ linterOptions: { | ||
reportUnusedDisableDirectives: true, | ||
} }, | ||
{ ignores: ['**/*.js', '**/*.d.ts', 'node_modules'] }, | ||
{ files: [globs.ts, globs.mjs], ...nodev20 }, | ||
{ files: [globs.ts, globs.mjs], ...nodeopt }, | ||
{ files: [globs.ts, globs.mjs], ...nodestyle }, | ||
|
||
{ files: [globs.ts], ...ts }, | ||
{ files: [globs.ts], ...tsoptional }, | ||
{ files: [globs.ts], ...tsstyle }, | ||
|
||
{ files: [globs.tests], ...mocha }, | ||
|
||
// Any custom settings to be applied | ||
{ files: [globs.ts], | ||
languageOptions: { | ||
parserOptions: { project: './tsconfig.json' }, | ||
}, | ||
rules: { | ||
// This repository is configured so that upon checkout, git should convert line endings to platform-specific | ||
// defaults and convert them back to LF when checking in. As such, we must enforce CRLF endings on Windows, | ||
// otherwise the lint task would fail on Windows systems. | ||
'linebreak-style': ['error', lbstyle], | ||
} }, | ||
] | ||
|
||
export default config |