-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #148 from RobotlegsJS/migrate-to-eslint
Migrate to eslint
- Loading branch information
Showing
46 changed files
with
2,261 additions
and
979 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 |
---|---|---|
@@ -0,0 +1,203 @@ | ||
/* | ||
👋 Hi! This file was autogenerated by tslint-to-eslint-config. | ||
https://github.com/typescript-eslint/tslint-to-eslint-config | ||
It represents the closest reasonable ESLint configuration to this | ||
project's original TSLint configuration. | ||
We recommend eventually switching this configuration to extend from | ||
the recommended rulesets in typescript-eslint. | ||
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md | ||
Happy linting! 💖 | ||
*/ | ||
module.exports = { | ||
env: { | ||
browser: true | ||
}, | ||
extends: ["prettier"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "tsconfig.test.json", | ||
sourceType: "module" | ||
}, | ||
plugins: [ | ||
"eslint-plugin-import", | ||
"eslint-plugin-prefer-arrow", | ||
"eslint-plugin-jsdoc", | ||
"eslint-plugin-unicorn", | ||
"eslint-plugin-react", | ||
"@typescript-eslint" | ||
], | ||
rules: { | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
default: "array" | ||
} | ||
], | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/consistent-type-assertions": "off", | ||
"@typescript-eslint/dot-notation": "error", | ||
"@typescript-eslint/explicit-member-accessibility": [ | ||
"error", | ||
{ | ||
accessibility: "explicit" | ||
} | ||
], | ||
"@typescript-eslint/indent": "off", | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"off", | ||
{ | ||
multiline: { | ||
delimiter: "none", | ||
requireLast: true | ||
}, | ||
singleline: { | ||
delimiter: "semi", | ||
requireLast: false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/member-ordering": "error", | ||
"@typescript-eslint/naming-convention": "error", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-namespace": "error", | ||
"@typescript-eslint/no-parameter-properties": "off", | ||
"@typescript-eslint/no-shadow": [ | ||
"error", | ||
{ | ||
hoist: "all" | ||
} | ||
], | ||
"@typescript-eslint/no-this-alias": "off", | ||
"@typescript-eslint/no-unused-expressions": "error", | ||
"@typescript-eslint/no-use-before-define": "error", | ||
"@typescript-eslint/no-var-requires": "error", | ||
"@typescript-eslint/prefer-for-of": "error", | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/prefer-namespace-keyword": "error", | ||
"@typescript-eslint/quotes": "off", | ||
"@typescript-eslint/semi": ["off", null], | ||
"@typescript-eslint/triple-slash-reference": [ | ||
"error", | ||
{ | ||
path: "always", | ||
types: "prefer-import", | ||
lib: "always" | ||
} | ||
], | ||
"@typescript-eslint/type-annotation-spacing": "off", | ||
"@typescript-eslint/unified-signatures": "error", | ||
"arrow-parens": ["off", "always"], | ||
"brace-style": ["off", "off"], | ||
"comma-dangle": "off", | ||
complexity: "off", | ||
"constructor-super": "error", | ||
curly: "error", | ||
"eol-last": "off", | ||
eqeqeq: ["error", "smart"], | ||
"guard-for-in": "error", | ||
"id-blacklist": "off", | ||
"id-match": "off", | ||
"import/no-extraneous-dependencies": "error", | ||
"import/no-internal-modules": "error", | ||
"import/order": "off", | ||
"jsdoc/check-alignment": "error", | ||
"jsdoc/check-indentation": "error", | ||
"jsdoc/newline-after-description": "error", | ||
"linebreak-style": "off", | ||
"max-classes-per-file": ["error", 1], | ||
"max-len": "off", | ||
"new-parens": "off", | ||
"newline-per-chained-call": "off", | ||
"no-bitwise": "error", | ||
"no-caller": "error", | ||
"no-cond-assign": "error", | ||
"no-console": [ | ||
"error", | ||
{ | ||
allow: [ | ||
"log", | ||
"warn", | ||
"dir", | ||
"timeLog", | ||
"assert", | ||
"clear", | ||
"count", | ||
"countReset", | ||
"group", | ||
"groupEnd", | ||
"table", | ||
"dirxml", | ||
"error", | ||
"groupCollapsed", | ||
"Console", | ||
"profile", | ||
"profileEnd", | ||
"timeStamp", | ||
"context" | ||
] | ||
} | ||
], | ||
"no-debugger": "error", | ||
"no-duplicate-case": "error", | ||
"no-duplicate-imports": "error", | ||
"no-empty": "off", | ||
"no-eval": "error", | ||
"no-extra-bind": "error", | ||
"no-extra-semi": "off", | ||
"no-fallthrough": "off", | ||
"no-invalid-this": "off", | ||
"no-irregular-whitespace": "off", | ||
"no-multiple-empty-lines": "off", | ||
"no-new-func": "error", | ||
"no-new-wrappers": "error", | ||
"no-redeclare": "error", | ||
"no-return-await": "error", | ||
"no-sequences": "error", | ||
"no-sparse-arrays": "error", | ||
"no-template-curly-in-string": "error", | ||
"no-throw-literal": "error", | ||
"no-trailing-spaces": "off", | ||
"no-undef-init": "error", | ||
"no-underscore-dangle": "off", | ||
"no-unsafe-finally": "error", | ||
"no-unused-labels": "error", | ||
"no-var": "error", | ||
"object-shorthand": "error", | ||
"one-var": ["error", "never"], | ||
"prefer-arrow/prefer-arrow-functions": "off", | ||
"prefer-const": "off", | ||
"prefer-object-spread": "error", | ||
"quote-props": "off", | ||
radix: "error", | ||
"react/jsx-curly-spacing": "off", | ||
"react/jsx-equals-spacing": "off", | ||
"react/jsx-tag-spacing": [ | ||
"off", | ||
{ | ||
afterOpening: "allow", | ||
closingSlash: "allow" | ||
} | ||
], | ||
"react/jsx-wrap-multilines": "off", | ||
"space-before-function-paren": "off", | ||
"space-in-parens": ["off", "never"], | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
markers: ["/"] | ||
} | ||
], | ||
"unicorn/prefer-ternary": "error", | ||
"use-isnan": "error", | ||
"valid-typeof": "off" | ||
} | ||
}; |
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,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint"] | ||
} |
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,25 +1,26 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"tslint.configFile": "tslint.test.json", | ||
|
||
// Set the default | ||
"editor.defaultFormatter": null, | ||
"editor.formatOnSave": false, | ||
|
||
// Enable per-language | ||
"[html]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
|
||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
|
||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
|
||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
} | ||
} |
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
Large diffs are not rendered by default.
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
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.