@stigg/eslint-config-stigg
v0.0.8
Published
---
Downloads
1,933
Maintainers
Keywords
Readme
Stigg shared eslint configuration
How to install?
yarn add -D @stigg/eslint-config-stigg
React project:
Install peer dependencies:
{
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint-config-airbnb": "^18.0.4",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^25.3.2",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-unused-imports": "^2.0.0"
}
}
Example .eslintrc.js
:
module.exports = {
extends: ["@stigg/eslint-config-stigg"],
parserOptions: {
project: "tsconfig.json",
},
root: true,
ignorePatterns: ["**/scripts/*", ".eslintrc.js", "craco.config.js"],
rules: {},
overrides: [
{
files: ["src/types/apiTypes.ts"],
rules: {
"no-use-before-define": "off",
},
},
],
};
Node project:
Install peer dependencies:
{
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^25.3.2"
}
}
Example .eslintrc.js
:
module.exports = {
extends: ["@stigg/eslint-config-stigg/node"],
parserOptions: {
project: "tsconfig.json",
},
root: true,
ignorePatterns: [".eslintrc.js"],
rules: {},
};