Skip to content

Commit

Permalink
Merge pull request #74 from msgpack/eslint-plugin-import
Browse files Browse the repository at this point in the history
introduce eslint-plugin-import
  • Loading branch information
gfx authored Jun 26, 2019
2 parents dae6712 + 488f524 commit a8c0922
Show file tree
Hide file tree
Showing 3 changed files with 715 additions and 187 deletions.
16 changes: 12 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
// https://prettier.io/docs/en/eslint.html
"plugin:prettier/recommended",

// https://github.com/benmosher/eslint-plugin-import
"plugin:import/recommended",
"plugin:import/typescript",
],
plugins: [],
parser: "@typescript-eslint/parser",
Expand All @@ -26,17 +30,21 @@ module.exports = {
"curly": "warn",
"no-param-reassign": "warn",

"import/no-unresolved": "off", // cannot handle `paths` in tsconfig
"import/no-cycle": "error",
"import/no-default-export": "error",

"@typescript-eslint/no-unused-vars":"warn",
"@typescript-eslint/array-type": ["error", "generic"],
"@typescript-eslint/array-type": ["warn", "generic"],
"@typescript-eslint/camelcase": "warn",
"@typescript-eslint/class-name-casing": "warn", // to allow the initial underscore
"@typescript-eslint/no-non-null-assertion": "warn", // NOTE: pay attention to it because it may cause unexpected behavior
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/no-for-in-array": "warn",

"@typescript-eslint/indent": "off",
"@typescript-eslint/no-explicit-any": "off",
Expand All @@ -45,7 +53,7 @@ module.exports = {
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-var-requires": "off", // not a part of ECMA-262
"@typescript-eslint/no-var-requires": "off", // enforces `import x = require("x")`, which is TypeScript-specific
"@typescript-eslint/prefer-interface": "off",

"prettier/prettier": "warn",
Expand Down
Loading

0 comments on commit a8c0922

Please sign in to comment.