commit | a75927857ea0ad0fd73374d8a125fdfeaf06209f | [log] [tgz] |
---|---|---|
author | Raphael von der GrĂ¼n <raphinesse@gmail.com> | Sat Nov 09 11:44:26 2019 +0100 |
committer | GitHub <noreply@github.com> | Sat Nov 09 11:44:26 2019 +0100 |
tree | c9188c7ffd1095de8c9f57d05226d7adeb4eb586 | |
parent | 84d08a6fb7053f0e31d40d9a75c31108410d99f1 [diff] |
feat: make base rules stricter & closer to semistandard (#10) This removes all exceptions from `semistandard` we had in place, except for `camelcase: off`. This step had already been taken in some of our repos (e.g. `cordova-js`, `cordova-common`) before. `camelcase` stays disabled for now as enabling & enforcing it would have the potential of creating many conflicts with existing work in progress.
This repository centralizes the ESLint configuration used for Cordova's development.
@cordova/eslint-config
comes with all plugins configs and even eslint
itself. So all you need to do to get started is:
npm i -D @cordova/eslint-config
# In package.json { "scripts": { "lint": "eslint ." } }
# In .eslintrc.yml root: true extends: '@cordova/eslint-config/node' overrides: - files: [spec/**/*.js] extends: '@cordova/eslint-config/node-tests' - files: [cordova-js-src/**/*.js] extends: '@cordova/eslint-config/browser'
This package exposes the following shareable ESLint configurations:
@cordova/eslint-config/node
(or simply @cordova
)For linting scripts intended to be run with Node.js.
@cordova/eslint-config/node-tests
For linting Jasmine tests of Cordova's Node.js scripts.
@cordova/eslint-config/browser
For linting cordova-style CommonJS modules intended to be run in the browser (before they are bundled).
@cordova/eslint-config/browser-tests
For linting Jasmine tests of Cordova's browser code.