Created
June 29, 2021 03:49
-
-
Save andrewriveradev/df39fc35dbd79fccd5057e8491a9d5cd to your computer and use it in GitHub Desktop.
[Boilerplate] ESLint + Prettier + stylelint + Tailwind + Cypress + TypeScript + VS Code
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
Show hidden characters
| { | |
| "env": { | |
| "browser": true, | |
| "es2021": true, | |
| "jest": true | |
| }, | |
| "extends": [ | |
| "plugin:react/recommended", | |
| "airbnb", | |
| "airbnb/hooks", | |
| "prettier" | |
| ], | |
| "parser": "babel-eslint", | |
| "parserOptions": { | |
| "ecmaFeatures": { | |
| "jsx": true | |
| }, | |
| "ecmaVersion": 12, | |
| "sourceType": "module" | |
| }, | |
| "plugins": ["react", "prettier"], | |
| "rules": { | |
| "react/jsx-filename-extension": [ | |
| "error", | |
| { | |
| "extensions": [".js", ".jsx", ".ts", ".tsx"] | |
| } | |
| ], | |
| "prettier/prettier": "error", | |
| "no-param-reassign": 0, | |
| "import/extensions": [ | |
| "error", | |
| "ignorePackages", | |
| { | |
| "js": "never", | |
| "jsx": "never", | |
| "ts": "never", | |
| "tsx": "never" | |
| } | |
| ] | |
| }, | |
| "settings": { | |
| "import/resolver": { | |
| "node": { | |
| "extensions": [".js", ".jsx", ".ts", ".tsx"] | |
| } | |
| } | |
| } | |
| } |
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
| { | |
| "singleQuote": true, | |
| "trailingComma": "all" | |
| } |
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
| { | |
| "extends": [ | |
| "stylelint-config-recommended", | |
| "stylelint-config-prettier" | |
| ], | |
| // Only for Tailwind support | |
| "rules": { | |
| "at-rule-no-unknown": [ | |
| true, | |
| { | |
| "ignoreAtRules": [ | |
| "tailwind", | |
| "apply", | |
| "variants", | |
| "responsive", | |
| "screen" | |
| ], | |
| }, | |
| ], | |
| "declaration-block-trailing-semicolon": null, | |
| "no-descending-specificity": null | |
| } | |
| } |
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
| { | |
| "plugins": ["cypress", "chai-friendly"], | |
| "extends": ["plugin:cypress/recommended", "plugin:chai-friendly/recommended"] | |
| } |
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
| { | |
| "editor.formatOnSave": true, | |
| "[javascript]": { | |
| "editor.formatOnSave": false | |
| }, | |
| "editor.codeActionsOnSave": { | |
| "source.fixAll.eslint": true | |
| }, | |
| "eslint.alwaysShowStatus": true, | |
| "eslint.validate": [ | |
| "javascript" | |
| ], | |
| "prettier.stylelintIntegration": true, | |
| "prettier.disableLanguages": [ | |
| "js" | |
| ], | |
| // Only for Tailwind support | |
| "css.validate": false, | |
| "less.validate": false, | |
| "scss.validate": false | |
| } |
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
| npm i -D babel-eslint eslint eslint-config-prettier eslint-plugin-chai-friendly eslint-plugin-cypress eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier stylelint stylelint-config-prettier stylelint-config-recommended | |
| npx install-peerdeps -D eslint-config-airbnb | |
| npm i -D --save-exact prettier | |
| # or | |
| yarn add babel-eslint eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-chai-friendly eslint-plugin-cypress eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks stylelint stylelint-config-prettier stylelint-config-recommended -D | |
| yarn add prettier -D --exact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment