generated from wandyezj/website
-
-
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.
- Loading branch information
Showing
3 changed files
with
1,580 additions
and
1,336 deletions.
There are no files selected for viewing
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,82 +1,87 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"rules": { | ||
// https://eslint.org/docs/latest/rules/eqeqeq | ||
// poka-yoke | ||
"eqeqeq": ["error", "always"], | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"rules": { | ||
// https://eslint.org/docs/latest/rules/eqeqeq | ||
// poka-yoke | ||
"eqeqeq": ["error", "always"], | ||
|
||
// Indent is enforced by prettier | ||
"indent": "off", | ||
"linebreak-style": ["warn", "unix"], | ||
// Indent is enforced by prettier | ||
"indent": "off", | ||
"linebreak-style": ["warn", "unix"], | ||
|
||
// https://eslint.org/docs/latest/rules/quotes | ||
// consistency | ||
"quotes": ["warn", "double", { "allowTemplateLiterals": true, "avoidEscape": true }], | ||
// https://eslint.org/docs/latest/rules/quotes | ||
// consistency | ||
"quotes": [ | ||
"warn", | ||
"double", | ||
{ "allowTemplateLiterals": true, "avoidEscape": true } | ||
], | ||
|
||
// https://eslint.org/docs/latest/rules/semi | ||
// poka-yoke | ||
"semi": ["warn", "always"], | ||
"no-debugger": "warn", | ||
// https://eslint.org/docs/latest/rules/semi | ||
// poka-yoke | ||
"semi": ["warn", "always"], | ||
"no-debugger": "warn", | ||
|
||
// | ||
// Es Lint Rules | ||
// | ||
// | ||
// Es Lint Rules | ||
// | ||
|
||
// https://typescript-eslint.io/rules/no-inferrable-types/ | ||
// disable - sometimes want to explicitly define types. | ||
"@typescript-eslint/no-inferrable-types": 0, | ||
// https://typescript-eslint.io/rules/no-inferrable-types/ | ||
// disable - sometimes want to explicitly define types. | ||
"@typescript-eslint/no-inferrable-types": 0, | ||
|
||
// https://typescript-eslint.io/rules/no-var-requires/ | ||
// disable - require is used in node js scripts | ||
"@typescript-eslint/no-var-requires": 0, | ||
// https://typescript-eslint.io/rules/no-var-requires/ | ||
// disable - require is used in node js scripts | ||
"@typescript-eslint/no-var-requires": 0, | ||
|
||
// https://typescript-eslint.io/rules/naming-convention/ | ||
// consistency | ||
"@typescript-eslint/naming-convention": [ | ||
"warn", | ||
{ | ||
"selector": ["default"], | ||
"format": ["strictCamelCase"], | ||
"leadingUnderscore": "forbid", | ||
"trailingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": ["variable"], | ||
"modifiers": ["const"], | ||
"format": ["strictCamelCase", "UPPER_CASE"], | ||
"leadingUnderscore": "forbid", | ||
"trailingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": "enumMember", | ||
"format": ["PascalCase"], | ||
"leadingUnderscore": "forbid", | ||
"trailingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": ["typeLike"], | ||
"format": ["PascalCase"] | ||
}, | ||
{ | ||
"selector": ["interface"], | ||
"format": ["PascalCase"], | ||
"custom": { | ||
"regex": "^I[A-Z]", | ||
"match": false | ||
} | ||
} | ||
] | ||
} | ||
// https://typescript-eslint.io/rules/naming-convention/ | ||
// consistency | ||
"@typescript-eslint/naming-convention": [ | ||
"warn", | ||
{ | ||
"selector": ["default"], | ||
"format": ["strictCamelCase"], | ||
"leadingUnderscore": "forbid", | ||
"trailingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": ["variable"], | ||
"modifiers": ["const"], | ||
"format": ["strictCamelCase" /*, "UPPER_CASE" */], | ||
"leadingUnderscore": "forbid", | ||
"trailingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": ["enumMember"], | ||
"format": ["PascalCase"], | ||
"leadingUnderscore": "forbid", | ||
"trailingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": ["typeLike"], | ||
"format": ["StrictPascalCase"] | ||
}, | ||
{ | ||
"selector": ["interface"], | ||
"format": ["StrictPascalCase"], | ||
"custom": { | ||
// Interface names must NOT be prefixed with I | ||
"regex": "^I[A-Z]", | ||
"match": false | ||
} | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.