JS and CSS lint configuration for projects
npm i --save-dev @frankrecalde/es-css-lint-config
.eslintrc
{
"extends": ["@frankrecalde/es-css-lint-config/drupal"],
"root": true
}
.stylelintrc
{
"extends": ["@frankrecalde/es-css-lint-config/style"]
}
.prettierrc.js
module.exports = {
...require("@frankrecalde/es-css-lint-config/prettier"),
};
or
package.json
{
"devDependencies": {
"@frankrecalde/es-css-lint-config": "^0.0.1"
},
"eslintConfig": {
"extends": ["@frankrecalde/es-css-lint-config/drupal"],
"root": true
},
"stylelint": { "extends": ["@frankrecalde/es-css-lint-config/style"] },
"prettier": "@frankrecalde/es-css-lint-config/prettier"
}
- EsLint
- Prettier - Code formatter
- Stylelint
"[javascript]": {
"editor.formatOnSave": false,
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
},
"[vue]": {
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"javascript.format.insertSpaceBeforeFunctionParenthesis": false,