generated from mizdra/npm-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from mizdra/update-project-config
Update project config
- Loading branch information
Showing
19 changed files
with
1,098 additions
and
1,144 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "ZixuanChen.vitest-explorer"] | ||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "vitest.explorer"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import mizdra from '@mizdra/eslint-config-mizdra'; | ||
import tsdoc from 'eslint-plugin-tsdoc'; | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
{ ignores: ['**/dist'] }, | ||
{ plugins: { tsdoc } }, | ||
...mizdra.baseConfigs, | ||
...mizdra.typescriptConfigs, | ||
...mizdra.nodeConfigs, | ||
{ | ||
files: ['**/*.{ts,tsx,cts,mts}', '**/*.{js,jsx,cjs,mjs}'], | ||
rules: { | ||
'simple-import-sort/imports': ['error', { groups: [['^\\u0000', '^node:', '^@?\\w', '^', '^\\.']] }], | ||
'n/no-unsupported-features/es-syntax': 'off', // temporary | ||
'n/no-unsupported-features/node-builtins': 'off', // temporary | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.{ts,tsx,cts,mts}'], | ||
rules: { | ||
'tsdoc/syntax': 'error', | ||
// In tsdoc, if you define a method type in a property style, it will not be determined as a method. | ||
// Therefore, it forces methods to be defined in method shorthand syntax. | ||
'@typescript-eslint/method-signature-style': ['error', 'method'], | ||
// In tsdoc, properties of a type defined with `interface` are included in the document, | ||
// whereas those defined with `type` are omitted from the document. | ||
// So we force types to be defined with `interface` whenever possible. | ||
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'], | ||
}, | ||
}, | ||
mizdra.prettierConfig, | ||
]; |
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
Oops, something went wrong.