Suitable the linters for your style
npm install -g linter-maintainer
The detail of each language usage is here
linter-maintainer --generate --eslint-js ./your/project/path > .eslintrc.json
$ linter-maintainer --eslint-js ./your/project/path
error symbol-description is available it should be added
error template-curly-spacing is available it should be added
error template-tag-spacing is available it should be added
error unicode-bom is available it should be added
error valid-jsdoc is available it should be added
error wrap-iife is available it should be added
error wrap-regex is available it should be added
error yield-star-spacing is available it should be added
error yoda is available it should be added
error no-fallthrough is ignored it should be removed
error no-redeclare is ignored it should be removed
error no-sparse-arrays is ignored it should be removed
error no-undef is ignored it should be removed
error no-unused-vars is ignored it should be removed
157 rules are available 5 rules are ignored
Total: 162
- make
.github/workflows/linter-maintainer.yml
on your project
name: "Linter-Maintainer test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- master
jobs:
lintermaintainer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install linter-maintainer
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- run: echo "::add-matcher::.github/linter-maintainer-match.json"
- name: Run linter-maintainer
run: node_modules/.bin/linter-maintainer ./src
- make
.github/linter-maintainer-match.json
{
"problemMatcher": [
{
"owner": "linter-maintainer",
"pattern": [
{
"regexp": "^(warning|error)\\s+(.+)\\s+is.+",
"severity": 1,
"message": 2
}
]
}
]
}
- Push your source code on the GitHub
- Check
Actions
button on your GitHub project - You'll get status of the linter
- ✅: Done
- 🏃: Work in progress
- 🐛: Bug fixing
Language | Tool | command | Validate Rules | Generate Rules |
---|---|---|---|---|
JavaScript | ESLint | --eslint-js | ✅ | ✅ |
JavaScript | StandardJS | |||
TypeScript | ESLint | --eslint-ts | ✅ | ✅ |
Java | PMD | --pmd-java | ✅ | ✅ |
Java | checkstyle | |||
Python | Pylint | --pylint | ✅ | ✅ |
Python | flake8 | |||
Python | black | |||
Ruby | RoboCop | |||
C++ | cpplint | |||
Go | golangci-lint |