yii2_mirror
Зеркало из https://github.com/yiisoft/yii2
/
.eslintrc
213 строк · 4.0 Кб
1ecmaFeatures:
2modules: true
3jsx: true
4
5env:
6amd: true
7browser: true
8es6: true
9jquery: true
10node: true
11
12# https://eslint.org/docs/latest/rules/
13rules:
14# Possible Errors
15comma-dangle: [2, never]
16no-cond-assign: 2
17no-console: 0
18no-constant-condition: 2
19no-control-regex: 2
20no-debugger: 2
21no-dupe-args: 2
22no-dupe-keys: 2
23no-duplicate-case: 2
24no-empty: 2
25no-empty-character-class: 2
26no-ex-assign: 2
27no-extra-boolean-cast: 2
28no-extra-parens: 0
29no-extra-semi: 2
30no-func-assign: 2
31no-inner-declarations: [2, functions]
32no-invalid-regexp: 2
33no-irregular-whitespace: 2
34no-negated-in-lhs: 2
35no-obj-calls: 2
36no-regex-spaces: 2
37no-sparse-arrays: 2
38no-unexpected-multiline: 2
39no-unreachable: 2
40use-isnan: 2
41valid-jsdoc: 0
42valid-typeof: 2
43
44# Best Practices
45accessor-pairs: 2
46block-scoped-var: 0
47complexity: [2, 6]
48consistent-return: 0
49curly: 0
50default-case: 0
51dot-location: 0
52dot-notation: 0
53eqeqeq: 2
54guard-for-in: 2
55no-alert: 2
56no-caller: 2
57no-case-declarations: 2
58no-div-regex: 2
59no-else-return: 0
60no-empty-label: 2
61no-empty-pattern: 2
62no-eq-null: 2
63no-eval: 2
64no-extend-native: 2
65no-extra-bind: 2
66no-fallthrough: 2
67no-floating-decimal: 0
68no-implicit-coercion: 0
69no-implied-eval: 2
70no-invalid-this: 0
71no-iterator: 2
72no-labels: 0
73no-lone-blocks: 2
74no-loop-func: 2
75no-magic-number: 0
76no-multi-spaces: 0
77no-multi-str: 0
78no-native-reassign: 2
79no-new-func: 2
80no-new-wrappers: 2
81no-new: 2
82no-octal-escape: 2
83no-octal: 2
84no-proto: 2
85no-redeclare: 2
86no-return-assign: 2
87no-script-url: 2
88no-self-compare: 2
89no-sequences: 0
90no-throw-literal: 0
91no-unused-expressions: 2
92no-useless-call: 2
93no-useless-concat: 2
94no-void: 2
95no-warning-comments: 0
96no-with: 2
97radix: 2
98vars-on-top: 0
99wrap-iife: 2
100yoda: 0
101
102# Strict
103strict: 0
104
105# Variables
106init-declarations: 0
107no-catch-shadow: 2
108no-delete-var: 2
109no-label-var: 2
110no-shadow-restricted-names: 2
111no-shadow: 0
112no-undef-init: 2
113no-undef: 0
114no-undefined: 0
115no-unused-vars: 0
116no-use-before-define: 0
117
118# Node.js and CommonJS
119callback-return: 2
120global-require: 2
121handle-callback-err: 2
122no-mixed-requires: 0
123no-new-require: 0
124no-path-concat: 2
125no-process-exit: 2
126no-restricted-modules: 0
127no-sync: 0
128
129# Stylistic Issues
130array-bracket-spacing: 0
131block-spacing: 0
132brace-style: 0
133camelcase: 0
134comma-spacing: 0
135comma-style: 0
136computed-property-spacing: 0
137consistent-this: 0
138eol-last: 0
139func-names: 0
140func-style: 0
141id-length: 0
142id-match: 0
143indent: 0
144jsx-quotes: 0
145key-spacing: 0
146linebreak-style: 0
147lines-around-comment: 0
148max-depth: 0
149max-len: 0
150max-nested-callbacks: 0
151max-params: 0
152max-statements: [2, 30]
153new-cap: 0
154new-parens: 0
155newline-after-var: 0
156no-array-constructor: 0
157no-bitwise: 0
158no-continue: 0
159no-inline-comments: 0
160no-lonely-if: 0
161no-mixed-spaces-and-tabs: 0
162no-multiple-empty-lines: 0
163no-negated-condition: 0
164no-nested-ternary: 0
165no-new-object: 0
166no-plusplus: 0
167no-restricted-syntax: 0
168no-spaced-func: 0
169no-ternary: 0
170no-trailing-spaces: 0
171no-underscore-dangle: 0
172no-unneeded-ternary: 0
173object-curly-spacing: 0
174one-var: 0
175operator-assignment: 0
176operator-linebreak: 0
177padded-blocks: 0
178quote-props: 0
179quotes: 0
180require-jsdoc: 0
181semi-spacing: 0
182semi: 0
183sort-vars: 0
184space-after-keywords: 0
185space-before-blocks: 0
186space-before-function-paren: 0
187space-before-keywords: 0
188space-in-parens: 0
189space-infix-ops: 0
190space-return-throw-case: 0
191space-unary-ops: 0
192spaced-comment: 0
193wrap-regex: 0
194
195# ECMAScript 6
196arrow-body-style: 0
197arrow-parens: 0
198arrow-spacing: 0
199constructor-super: 0
200generator-star-spacing: 0
201no-arrow-condition: 0
202no-class-assign: 0
203no-const-assign: 0
204no-dupe-class-members: 0
205no-this-before-super: 0
206no-var: 0
207object-shorthand: 0
208prefer-arrow-callback: 0
209prefer-const: 0
210prefer-reflect: 0
211prefer-spread: 0
212prefer-template: 0
213require-yield: 0
214