@kampaay/eslint-config-kampaay-react
[Kampaay][kampaay-home]’s ESLint shared configuration for React.
Installation
Use the configuration for a ready-to-lint React setup.
npx install-peerdeps --dev @kampaay/eslint-config-kampaay-react
Add scripts to your package.json
:
{
"scripts": {
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"lint:fix": "npm run lint -- --fix"
},
"eslintConfig": {
"extends": ["@kampaay/eslint-config-kampaay-react"]
}
}
Integrate with VS Code
You probably want your editor to lint and fix for you.
Here are the instructions for VS Code:
-
Install the ESLint extension
-
Create
.vscode
folder and insidesettings.json
write:
{
"javascript.validate.enable": false,
"typescript.validate.enable": false,
"tslint.enable": false,
"eslint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.format.enable": true,
"[javascript]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascriptreact]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescriptreact]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
}
}
License
Copyright (c) 2020 Kampaay Srl
Licensed under the EUPL
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence online at the EUPL.eu webite.
Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and limitations under the Licence.