Package Name | Description |
---|---|
tslint | An extensible linter for the TypeScript language. |
tslint-config-airbnb | A TSLint config for Airbnb JavaScript Style. |
tslint-config-prettier | Use tslint with prettier without any conflict. |
tslint-plugin-prettier | Runs Prettier as a TSLint rule and reports differences as individual TSLint issues. |
eslint-config-prettier | Turns off all rules that are unnecessary or might conflict with Prettier. |
@typescript-eslint/parser | An ESLint-specific parser which leverages typescript-estree and is designed to be used as a replacement for ESLint's default parser, espree . |
eslint-plugin-react-hooks | This ESLint plugin enforces the Rules of Hooks. |
@typescript-eslint/eslint-plugin | An ESLint-specific plugin which, when used in conjunction with @typescript-eslint/parser , allows for TypeScript-specific linting rules to run. |
prettier | Prettier is an opinionated code formatter. |
stylelint | A mighty, modern linter that helps you avoid errors and enforce conventions in your styles. |
stylelint-config-prettier | Turns off all rules that are unnecessary or might conflict with prettier. |
stylelint-config-recommended | The recommended shareable config for stylelint. |
stylelint-config-styled-components | The shareable stylelint config for stylelint-processor-styled-components. |
stylelint-processor-styled-components | Lint your styled components with stylelint. |
yarn add -D tslint tslint-config-airbnb tslint-config-prettier tslint-plugin-prettier eslint-config-prettier eslint-plugin-react-hooks @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier stylelint stylelint-config-prettier stylelint-config-recommended stylelint-config-styled-components stylelint-processor-styled-components
touch .eslintrc .prettierrc .stylelintrc
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["dom", "es6", "es2017", "esnext"],
"sourceMap": true,
"outDir": "build/",
"moduleResolution": "node",
"declaration": false,
"composite": false,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"newLine": "LF",
"experimentalDecorators": true,
"skipLibCheck": true,
"allowJs": false,
"jsx": "react",
"rootDir": "src",
"baseUrl": "src",
"forceConsistentCasingInFileNames": true,
"suppressImplicitAnyIndexErrors": true,
"paths": {
"*": ["src/*", "node_modules/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "build", "dist", "scripts"]
}
{
"extends": [
"plugin:@typescript-eslint/recommended",
"airbnb",
"prettier",
"prettier/@typescript-eslint",
"prettier/react",
"plugin:prettier/recommended",
"plugin:jest/recommended",
"plugin:unicorn/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": false
},
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"@typescript-eslint/tslint",
"prettier",
"jest",
"unicorn"
],
"env": {
"node": true,
"es6": true,
"browser": true,
"jest": true
},
"rules": {
"@typescript-eslint/class-name-casing": "warn",
"react/jsx-filename-extension": "off",
"unicorn/filename-case": "off",
"import/extensions": { "ts": "never", "tsx": "never" },
"no-use-before-define": "warn",
"no-param-reassign": "warn"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false
}
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components",
"stylelint-config-prettier"
]
}
This project was bootstrapped with Create React App.