Przykłady

Test airbnb-base

{
  "env": {
    "es6": true,
    "node": true
  },
  "extends": "airbnb-base",
  "parserOptions": {
    "ecmaVersion": 2018
  },
  "rules": {
    "semi": "off",
    "quotes": [2, "double", "avoid-escape"],
    "no-prototype-builtins": "off",
    "prefer-template": "off",
    "no-plusplus": "off",
    "no-use-before-define": "off",
    "object-shorthand": ["error", "properties"],
    "arrow-parens": ["error", "as-needed"],
    "no-console": "off",
    "import/no-extraneous-dependencies": [
      "error",
      { "devDependencies": ["!gulpfile.js/**/*"] }
    ],
    "comma-dangle": [
      "error",
      {
        "arrays": "always",
        "objects": "always",
        "imports": "ignore",
        "exports": "ignore",
        "functions": "ignore"
      }
    ]
  }
}

Test Eslint Typescript

{
  "parser": "@typescript-eslint/parser",
  "env": {
    "es6": true,
    "node": true,
    "browser": true,
    "jest": true
  },
  // prettier-ignore
  "extends": [
    "airbnb-base", 
    "plugin:@typescript-eslint/recommended"
  ],
  "plugins": ["@typescript-eslint"],
  "settings": {
    "import/parsers": {
      "@typescript-eslint/parser": [".ts", ".tsx"]
    },
    "import/resolver": {
      "node": {
        "extensions": [".js", ".jsx", ".ts", ".tsx"]
      }
    }
  },
  "rules": {
    "semi": "off",
    "quotes": [2, "double", "avoid-escape"],
    "@typescript-eslint/indent": ["error", 2],
    "@typescript-eslint/no-use-before-define": "off",
    "no-use-before-define": "off",
    "no-plusplus": "off",
    "comma-dangle": [
      "error",
      {
        "arrays": "ignore",
        "objects": "always",
        "imports": "ignore",
        "exports": "ignore",
        "functions": "ignore"
      }
    ]
  }
}
module.exports = {
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint"],
  "extends": ["plugin:@typescript-eslint/recommended"],
  "rules": {
      "@typescript-eslint/no-explicit-any": "off"
  },
  "overrides": [
      {
          "files": "*.js",
          "rules": {
              "@typescript-eslint/no-var-requires": "off"}
      }
  ]
};
{
  "extends": [
    "airbnb-base",
    "plugin:@typescript-eslint/recommended",
    "plugin:import/recommended",
    "plugin:import/typescript",
    "plugin:prettier/recommended"
  ],
  "rules": {
    "quotes": [
      "error",
      "single",
      { "avoidEscape": true, "allowTemplateLiterals": false }
    ],
    "@typescript-eslint/indent": ["error", 2]
  },
  "settings": {
    "import/parsers": {
      "@typescript-eslint/parser": [".ts", ".tsx"]
    }
  }
}