- Set the version for
eslintin dev dependencies too7.3.0^and runyarn - Run
npx install-peerdeps --dev eslint-config-airbnb-base - Run
yarn add --dev eslint-config-airbnb-typescript eslint-plugin-jest eslint-plugin-promise eslint-plugin-sonarjs eslint-plugin-prefer-arrow - Copy in the contents of this Gist's eslint config file
Last active
February 20, 2022 13:05
-
-
Save TClark1011/c4378ed74183bf45e7f9ef137f786d10 to your computer and use it in GitHub Desktop.
Bag of Holding V2 Eslint Setup
This file contains hidden or 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
| module.exports = { | |
| root: true, | |
| parser: "@typescript-eslint/parser", | |
| extends: [ | |
| "eslint:recommended", | |
| "plugin:@typescript-eslint/recommended", | |
| "airbnb-base", | |
| "airbnb-typescript/base", | |
| "plugin:jest/recommended", | |
| "plugin:sonarjs/recommended", | |
| "plugin:promise/recommended", | |
| "prettier", | |
| ], | |
| plugins: [ | |
| "svelte3", | |
| "@typescript-eslint", | |
| "import", | |
| "jest", | |
| "promise", | |
| "sonarjs", | |
| "prefer-arrow", | |
| ], | |
| ignorePatterns: ["*.cjs", "svelte.config.js", "cypress/**/*.js"], | |
| overrides: [ | |
| { | |
| files: ["*.svelte"], | |
| processor: "svelte3/svelte3", | |
| rules: { | |
| "import/prefer-default-export": "off", | |
| "import/no-mutable-exports": "off", | |
| }, | |
| }, | |
| { | |
| files: ["**/index.ts"], | |
| rules: { | |
| "no-restricted-exports": "off", | |
| }, | |
| }, | |
| ], | |
| settings: { | |
| "svelte3/typescript": () => require("typescript"), | |
| }, | |
| parserOptions: { | |
| sourceType: "module", | |
| ecmaVersion: 2020, | |
| project: ["./tsconfig.json", "./cypress/tsconfig.json"], | |
| tsconfigRootDir: __dirname, | |
| extraFileExtensions: [".svelte"], | |
| }, | |
| env: { | |
| browser: true, | |
| es2017: true, | |
| node: true, | |
| }, | |
| rules: { | |
| "prefer-arrow/prefer-arrow-functions": [ | |
| "error", | |
| { | |
| disallowPrototype: true, | |
| singleReturnOnly: false, | |
| classPropertiesAllowed: false, | |
| }, | |
| ], | |
| }, | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment