Skip to content

Instantly share code, notes, and snippets.

@Knovour
Created February 25, 2023 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Knovour/1f1f363c41737eb4f07b9aaa82fc0d19 to your computer and use it in GitHub Desktop.
Save Knovour/1f1f363c41737eb4f07b9aaa82fc0d19 to your computer and use it in GitHub Desktop.
typescript eslint config
{
"env": {
"browser": true,
"es6": true
},
"extends": ["airbnb-typescript", "plugin:prettier/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "prefer-arrow", "prettier"],
"rules": {
"@typescript-eslint/no-redeclare": 0,
"@typescript-eslint/no-unused-expressions": 0,
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": [2, "as-needed"],
"comma-dangle": ["error", "only-multiline"],
"consistent-return": 0,
"curly": ["error", "multi-or-nest"],
"default-case": 0,
"function-paren-newline": 0,
"id-blacklist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"implicit-arrow-linebreak": 0,
"import/extensions": 0,
"import/no-extraneous-dependencies": 0,
"max-len": 0,
"newline-per-chained-call": 0,
"no-anonymous-exports-page-templates": 0,
"no-confusing-arrow": 0,
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-param-reassign": 0,
"no-tabs": ["error", { "allowIndentationTabs": true }],
"no-template-curly-in-string": 0,
"object-curly-newline": 0,
"operator-linebreak": 0,
"prettier/prettier": 0,
"react/jsx-filename-extension": 0,
"space-before-function-paren": 0
}
}
{
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"eslint": "^8.33.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^4.2.1",
"typescript": "^4.9.5",
}
}
{
"compileOnSave": false,
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"jsx": "preserve",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"noImplicitAny": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"removeComments": false,
"preserveConstEnums": true,
"sourceMap": true,
"skipLibCheck": true,
"noEmit": false,
"baseUrl": ".",
"lib": ["dom", "es2015", "es2016", "es2017", "es2018", "ESNext"]
},
"include": ["js/**/*", "**/*.js"],
"exclude": ["dist/**/*", "node_modules"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment