Skip to content

Instantly share code, notes, and snippets.

@andrewriveradev
Created June 29, 2021 03:49
Show Gist options
  • Select an option

  • Save andrewriveradev/df39fc35dbd79fccd5057e8491a9d5cd to your computer and use it in GitHub Desktop.

Select an option

Save andrewriveradev/df39fc35dbd79fccd5057e8491a9d5cd to your computer and use it in GitHub Desktop.
[Boilerplate] ESLint + Prettier + stylelint + Tailwind + Cypress + TypeScript + VS Code
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"airbnb/hooks",
"prettier",
"prettier/react"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"prettier"
],
"rules": {
"react/jsx-filename-extension": [
"error",
{
"extensions": [
".js",
".jsx"
]
}
],
"prettier/prettier": "error",
"no-param-reassign": 0
}
}
{
"singleQuote": true,
"trailingComma": "all"
}
{
"extends": [
"stylelint-config-recommended",
"stylelint-config-prettier"
],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
],
},
],
"declaration-block-trailing-semicolon": null,
"no-descending-specificity": null
}
}
"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"
],
"css.validate": false,
"less.validate": false,
"scss.validate": false
npm install --save-dev eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier stylelint stylelint-config-prettier stylelint-config-recommended
npm install --save-dev --save-exact prettier
# or
yarn add --dev eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks stylelint stylelint-config-prettier stylelint-config-recommended
yarn add --dev --exact prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment