eslint-config-fliplet v1.0.12
ESLint config for JS code in Fliplet apps
Installation
npm install --save-dev eslint-config-flipletMake sure the package-lock.json file is committed too.
Usage
Once the eslint-config-fliplet package is installed, you can use it by specifying fliplet in the extends section of your .eslintrc ESLint configuration.
{
"extends": "fliplet",
"rules": {
// Additional, per-project rules...
}
}Using the fliplet config with eslint:recommended
There are several rules in the eslint:recommended rule set that Fliplet style is not opinionated about that you might want to enforce in your project.
To use Fliplet style in conjunction with ESLint's recommended rule set, extend them both, making sure to list fliplet last:
{
"extends": ["eslint:recommended", "fliplet"],
"rules": {
// Additional, per-project rules...
}
}To see how the fliplet config compares with eslint:recommended, refer to the source code of index.js, which lists every ESLint rule along with whether (and how) it is enforced by the fliplet config.
Configure GitHub for automated linting
- Add
main.ymlworkflow file in the root directory for the repository. Seeexample/main.ymlfor a sample file. - Amend
package.jsonfile to link to the script:
{
"scripts": {
"eslint:github-action": "eslint ."
}
}Once the setup is complete, each commit will trigger a build that creates annotations for all problems found (see example).
License
Apache-2 © Fliplet