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:
Kirill Zaitsev 2015-07-29 00:39:47 +03:00
parent ae9bcc9b66
commit 0f6186b231
2 changed files with 4 additions and 20 deletions

View File

@ -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

View File

@ -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"