-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: reconfigure ESLint using flat config
- Loading branch information
1 parent
b0e6658
commit 6edc434
Showing
7 changed files
with
67 additions
and
56 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import node from '@strv/eslint-config-node' | ||
import nodeopt from '@strv/eslint-config-node/optional' | ||
import nodestyle from '@strv/eslint-config-node/style' | ||
import ts from '@strv/eslint-config-typescript' | ||
import tsopt from '@strv/eslint-config-typescript/optional' | ||
import tsstyle from '@strv/eslint-config-typescript/style' | ||
|
||
const globs = { | ||
js: '**/*.js', | ||
mjs: '**/*.mjs', | ||
ts: '**/*.ts', | ||
dts: '**/*.d.ts', | ||
} | ||
|
||
/** @type {Array<import("eslint").Linter.FlatConfig>} */ | ||
const config = [ | ||
{ linterOptions: { | ||
reportUnusedDisableDirectives: true, | ||
} }, | ||
|
||
{ files: [globs.ts, globs.dts, globs.mjs], ...node }, | ||
{ files: [globs.ts, globs.dts, globs.mjs], ...nodeopt }, | ||
{ files: [globs.ts, globs.dts, globs.mjs], ...nodestyle }, | ||
|
||
{ files: [globs.ts, globs.dts], ...ts }, | ||
{ files: [globs.ts, globs.dts], ...tsopt }, | ||
{ files: [globs.ts, globs.dts], ...tsstyle }, | ||
|
||
{ files: [globs.ts, globs.dts], | ||
languageOptions: { | ||
parserOptions: { project: './tsconfig.json' }, | ||
}, | ||
rules: {} }, | ||
|
||
{ files: [globs.ts, globs.dts, globs.mjs], | ||
rules: { | ||
// We depend on TypeScript to catch unresolved module paths | ||
'import/no-unresolved': 'off', | ||
'import/no-extraneous-dependencies': ['error', { | ||
devDependencies: [ | ||
globs.ts, | ||
globs.dts, | ||
globs.mjs, | ||
globs.js, | ||
], | ||
}], | ||
} }, | ||
{ | ||
ignores: [ | ||
globs.js, | ||
'node_modules', | ||
'samples', | ||
], | ||
}, | ||
] | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import type { CodePalette, ColourPalette } from '@remedy/types' | ||
import { type CodePalette, type ColourPalette } from '@remedy/types' | ||
|
||
interface InputParams { | ||
code: CodePalette | ||
colours: ColourPalette | ||
} | ||
|
||
export { | ||
InputParams | ||
InputParams, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters