@@ -18,37 +18,37 @@ module.exports = {
1818 // This rule enforces consistent use of trailing commas in object and array literals
1919 // Allow trailing commas for func parameters, array and object literals spread across
2020 // multiple lines
21- 'comma-dangle' : [ 1 , 'always-multiline' ] ,
21+ 'comma-dangle' : [ 'warn' , 'always-multiline' ] ,
2222
2323 // Require Camelcase
2424 // This rule looks for any underscores (_) located within the source code. It ignores leading
2525 // and trailing underscores and only checks those in the middle of a variable name. If ESLint
2626 // decides that the variable is a constant (all uppercase), then no warning will be thrown.
27- camelcase : [ 1 , {
27+ camelcase : [ 'warn' , {
2828 properties : 'always' ,
2929 } ] ,
3030
3131 // Require Consistent This
3232 // This rule designates a variable as the chosen alias for `this`.
33- 'consistent-this' : [ 1 , 'self' ] ,
33+ 'consistent-this' : [ 'warn' , 'self' ] ,
3434
3535 // Enforce Function Style
3636 // Due to these different behaviors, it is common to have guidelines as to which style of
3737 // function should be used. There is really no correct or incorrect choice here, it is just a
3838 // preference. A good reason to use function declarations is that the function names then appear
3939 // in stack traces which help during debugging.
4040 // Allow arrow functions to be saved into variables
41- 'func-style' : [ 1 , 'declaration' , {
41+ 'func-style' : [ 'warn' , 'declaration' , {
4242 allowArrowFunctions : true ,
4343 } ] ,
4444
4545 // Require function names to match the name of the variable to which they are assigned
46- 'func-name-matching' : 1 ,
46+ 'func-name-matching' : 'warn' ,
4747
4848 // Limit minimum and maximum length for identifiers
4949 // This rule is aimed at increasing code readability and maintainability by enforcing an
5050 // identifier length convention.
51- 'id-length' : [ 1 , {
51+ 'id-length' : [ 'warn' , {
5252 min : 2 ,
5353 max : 25 ,
5454 exceptions : [
@@ -61,95 +61,95 @@ module.exports = {
6161 // Very long lines of code in any language can be difficult to read. In order to aid in
6262 // readability and maintainability many coders have developed a convention to limit lines of
6363 // code to a certain number of characters.
64- 'max-len' : [ 1 , 100 , 2 ] ,
64+ 'max-len' : [ 'warn' , 100 , 2 ] ,
6565
6666 // Limit Maximum Number of Parameters
6767 // Functions that take numerous parameters can be difficult to read and write because it
6868 // requires the memorization of what each parameter is, its type, and the order they should
6969 // appear in.
70- 'max-params' : [ 1 , 4 ] ,
70+ 'max-params' : [ 'warn' , 4 ] ,
7171
7272 // Set Maximum Depth of Nested Callbacks
7373 // This rule is aimed at increasing code clarity by discouraging deeply nesting callbacks.
74- 'max-nested-callbacks' : [ 1 , 4 ] ,
74+ 'max-nested-callbacks' : [ 'warn' , 4 ] ,
7575
7676 // Specify the Maximum Number of Statements Allowed per Line
7777 // A line of code containing too many statements can be difficult to read. Code is generally
7878 // read from the top down, especially when scanning, so limiting the number of statements
7979 // allowed on a single line can be very beneficial for readability and maintainability.
80- 'max-statements-per-line' : 1 ,
80+ 'max-statements-per-line' : 'warn' ,
8181
8282 // Require Constructors to Use Initial Caps
8383 // This rule is aimed at helping to distinguish regular functions from constructor functions. As
8484 // such, it warns whenever it sees new followed by an identifier that isn't capitalized or
8585 // whenever it sees capitalized function called directly without new operator.
86- 'new-cap' : [ 1 , {
86+ 'new-cap' : [ 'warn' , {
8787 newIsCap : true ,
8888 capIsNew : true ,
8989 } ] ,
9090
9191 // Newline Per Chained Method Call
9292 // This rule checks and reports the chained calls if there are no new lines after each call or
9393 // deep member access.
94- 'newline-per-chained-call' : [ 1 , {
94+ 'newline-per-chained-call' : [ 'warn' , {
9595 ignoreChainWithDepth : 3 ,
9696 } ] ,
9797
9898 // Disallow duplicate exports/imports
9999 // An ES6/ES2015 import can be spread over multiple lines, but this takes up unneeded
100100 // whitespace. This rules validates that all imports from a single module exists in a single
101101 // import statement.
102- 'no-duplicate-imports' : [ 1 , {
102+ 'no-duplicate-imports' : [ 'warn' , {
103103 includeExports : true ,
104104 } ] ,
105105
106106 // Disallows comments after code
107107 // This rule will disallow comments on the same line as code.
108- 'no-inline-comments' : 1 ,
108+ 'no-inline-comments' : 'warn' ,
109109
110110 // Disallow mixes of different operators
111111 // Enclosing complex expressions by parentheses clarifies the developer’s intention, which makes
112112 // the code more readable. This rule warns when different operators are used consecutively
113113 // without parentheses in an expression.
114- 'no-mixed-operators' : 1 ,
114+ 'no-mixed-operators' : 'warn' ,
115115
116116 // Disallow mixed spaces and tabs for indentation
117117 // The no-mixed-spaces-and-tabs rule is aimed at flagging any lines of code that are indented
118118 // with a mixture of tabs and spaces.
119- 'no-mixed-spaces-and-tabs' : 1 ,
119+ 'no-mixed-spaces-and-tabs' : 'warn' ,
120120
121121 // Disallow tabs
122122 // Use of tabs is discouraged in favour of spaces because there is no "standard" width for a tab
123123 // character and many viewers/editors use their own tab width, which could cause code to be
124124 // misaligned and not formatted as intended/indented.
125- 'no-tabs' : 1 ,
125+ 'no-tabs' : 'warn' ,
126126
127127 // Disallow Nested Ternaries
128128 // The no-nested-ternary rule aims to increase the clarity and readability of code by
129129 // disallowing the use of nested ternary expressions.
130- 'no-nested-ternary' : 2 ,
130+ 'no-nested-ternary' : 'error' ,
131131
132132 // Disallow Dangling Underscores in Identifiers
133- 'no-underscore-dangle' : 1 ,
133+ 'no-underscore-dangle' : 'warn' ,
134134
135135 // Disallow Warning Comments
136136 // These comments are a warning signal, that there is something not production ready in your
137137 // code. Most likely you want to fix it or remove the comments before you roll out your code
138138 // with a good feeling.
139- 'no-warning-comments' : [ 1 , {
139+ 'no-warning-comments' : [ 'warn' , {
140140 location : 'anywhere' ,
141141 } ] ,
142142
143143 // Require or Disallow One Variable Declaration per Scope
144144 // This rule is aimed at enforcing the use of one variable declaration per function (for var)
145145 // and multiple variable declaration per block (for let and const) scope.
146- 'one-var' : [ 1 , {
146+ 'one-var' : [ 'warn' , {
147147 var : 'always' ,
148148 let : 'never' ,
149149 const : 'never' ,
150150 } ] ,
151151
152152 // Enforces having an empty line after the last top-level import statement or require call
153- 'import/newline-after-import' : 1 ,
153+ 'import/newline-after-import' : 'warn' ,
154154 } ,
155155}
0 commit comments