cosmjs/.eslintrc.js

67 lines
2.1 KiB
JavaScript
Raw Normal View History

module.exports = {
env: {
es6: true,
jasmine: true,
node: true,
worker: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
2020-02-19 09:30:26 +01:00
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import", "functional"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:import/typescript",
],
rules: {
curly: ["warn", "multi-line", "consistent"],
"no-console": ["warn", { allow: ["error", "info", "warn"] }],
"no-param-reassign": "warn",
"no-shadow": "warn",
"prefer-const": "warn",
2020-02-10 12:40:53 +01:00
"radix": ["warn", "always"],
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
"import/no-cycle": "warn",
"simple-import-sort/sort": "warn",
2020-02-19 08:59:59 +01:00
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
2020-02-19 09:03:17 +01:00
"@typescript-eslint/no-dynamic-delete": "warn",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
2020-02-19 08:58:34 +01:00
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/prefer-readonly": "warn",
2020-02-19 09:30:26 +01:00
"functional/no-method-signature": "warn",
},
overrides: [
{
files: "**/*.js",
rules: {
"@typescript-eslint/no-var-requires": "off",
2020-02-07 16:40:15 +01:00
"@typescript-eslint/explicit-function-return-type": "off",
},
},
{
files: "**/*.spec.ts",
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
},
},
{
files: "jasmine-testrunner.js",
rules: {
"@typescript-eslint/camelcase": ["error", { properties: "never" }],
},
},
],
};