You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
snabbdom/.eslintrc.cjs

74 lines
2.0 KiB
JavaScript

module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:markdown/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier",
],
env: {
browser: true,
node: false,
},
ignorePatterns: ["browserstack-browsers.js", "web-test-runner.config.js"],
overrides: [
{
files: ["*.ts", "*.tsx"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json", "test/tsconfig.json"],
},
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
},
},
{
files: ["test/unit/**/*.ts", "test/unit/*.tsx"],
env: {
browser: true,
node: true,
},
},
{
files: ["examples/**/*.js"],
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
},
},
{
files: ["*.js"],
excludedFiles: ["examples/**"],
extends: ["plugin:node/recommended"],
env: {
node: true,
browser: false,
},
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
],
rules: {
"max-statements-per-line": "error",
"no-var": "error",
"import/newline-after-import": "error",
"import/no-default-export": "error",
},
};