Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
wandyezj committed Feb 16, 2024
2 parents d5dc7e0 + 8bf783f commit 77e8948
Show file tree
Hide file tree
Showing 3 changed files with 1,580 additions and 1,336 deletions.
151 changes: 78 additions & 73 deletions config/eslint.json
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
}
}
]
}
}
Loading

0 comments on commit 77e8948

Please sign in to comment.