Adopt openstack-config for eslint
Since openstack-config for eslint is now published on npm we should use it as basis for our linting rules. It is actually stricter, than our current semi-default config as it enables some of the previously unchecked rules. Partially implements: blueprint add-js-lint-jobs Change-Id: I0cb8247167a44f30a657693442f99a87f116350a
This commit is contained in:
parent
ae9bcc9b66
commit
0f6186b231
21
.eslintrc
21
.eslintrc
@ -1,30 +1,13 @@
|
||||
# For a detailed list of all options please see here:
|
||||
# http://eslint.org/docs/configuring/
|
||||
|
||||
extends: openstack
|
||||
|
||||
env:
|
||||
# Use jquery global variables
|
||||
jquery: true
|
||||
browser: true
|
||||
|
||||
rules:
|
||||
# Specify whether backticks, double or single quotes should be used
|
||||
# http://eslint.org/docs/rules/quotes
|
||||
quotes:
|
||||
- 0 # TODO(kzaitsev): Activate & Fix
|
||||
- 'single'
|
||||
|
||||
# Require camel case names
|
||||
# http://eslint.org/docs/rules/camelcase
|
||||
camelcase:
|
||||
- 1
|
||||
- properties: "never"
|
||||
|
||||
# This option sets a specific tab width for your code
|
||||
# http://eslint.org/docs/rules/indent
|
||||
indent:
|
||||
- 2 # Mark as errors.
|
||||
- 2 # NOTE(kzaitsev): horizon also uses 2 space indentation.
|
||||
|
||||
globals:
|
||||
# allow accessing horizon
|
||||
horizon: false
|
||||
|
@ -6,7 +6,8 @@
|
||||
"repository": "none",
|
||||
"license": "Apache 2.0",
|
||||
"devDependencies": {
|
||||
"eslint": "^0.23.0"
|
||||
"eslint": "^0.23.0",
|
||||
"eslint-config-openstack": "1.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --no-color muranodashboard/static"
|
||||
|
Loading…
Reference in New Issue
Block a user