Add selective ESLint rule activation for Horizon Legacy JS

This patch adds the files for eslint overrides in the two different
segments of horizon's codebase: Legacy and Dashboard. There are
quite a few rules that had to be deactivated, which will reduce
the effectiveness of legacy linting.

Note: You cannot disable plugins in .eslintrc files, you can
only enable them. This is why there appear to be two redundant
.eslintrc files that enable the angular rules.

Change-Id: I5768cbc43e788a4320a6bb637c263dc3c3df3db9
Partially-Implements: blueprint jscs-cleanup
This commit is contained in:
Michael Krotscheck 2015-06-25 17:08:40 -07:00
parent 4d4045097e
commit b8c7846c3d
5 changed files with 55 additions and 5 deletions

View File

@ -4,10 +4,6 @@
# By default, ESLint uses Espree as its parser.
parser: espree
# Enable eslint-plugin-angular
plugins:
- angular
# Set up globals
globals:
angular: false
@ -786,7 +782,7 @@ rules:
# specify the maximum length of a line in your program
# http://eslint.org/docs/rules/max-len
max-len:
- 2 # TODO(krotscheck): Activate & Fix
- 2
- 100
# Limits the number of parameters that can be used in function declaration.

View File

@ -0,0 +1,21 @@
# ESLint styles for Horizon's Legacy javascript code. These rule overrides exist to enforce an
# older linting style, to ensure backward compatibility.
rules:
# Various rules applicable to our new Code Style guidelines were only intermittently enforced
# in the legacy code, and were not addressed during the JSCS move. This disables the applicable
# rules.
camelcase: 0
max-len: 0
space-before-blocks: 0
one-var: 0
space-infix-ops: 0
space-after-keywords: 0
no-console: 0
no-multiple-empty-lines: 0
no-sync: 0
no-process-exit: 0
space-unary-ops: 0
curly: 0
indent: 0

View File

@ -0,0 +1,6 @@
# ESLint styles for this section of horizon's codebase. It activates the John Papa
# Style plugin for all javascript files in this directory or below.
# Enable eslint-plugin-angular
plugins:
- angular

View File

@ -0,0 +1,21 @@
# ESLint styles for Horizon's Legacy javascript code. These rule overrides exist to enforce an
# older linting style, to ensure backward compatibility.
rules:
# Various rules applicable to our new Code Style guidelines were only intermittently enforced
# in the legacy code, and were not addressed during the JSCS move. This disables the applicable
# rules.
camelcase: 0
max-len: 0
space-before-blocks: 0
one-var: 0
space-infix-ops: 0
space-after-keywords: 0
no-console: 0
no-multiple-empty-lines: 0
no-sync: 0
no-process-exit: 0
space-unary-ops: 0
curly: 0
indent: 0

View File

@ -0,0 +1,6 @@
# ESLint styles for this section of horizon's codebase. It activates the John Papa
# Style plugin for all javascript files in this directory or below.
# Enable eslint-plugin-angular
plugins:
- angular