Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 05a5d64

Browse files
committed
linter
1 parent 1e56d31 commit 05a5d64

File tree

2 files changed

+265
-0
lines changed

2 files changed

+265
-0
lines changed

.eslintrc

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
{
2+
"rules": {
3+
"no-cond-assign": 2,
4+
"no-constant-condition": 2,
5+
"comma-dangle": 2,
6+
"no-control-regex": 2,
7+
"no-debugger": 2,
8+
"no-dupe-keys": 2,
9+
"no-empty": 2,
10+
"no-extra-semi": 2,
11+
"no-inner-declarations": 2,
12+
"no-invalid-regexp": 2,
13+
"no-negated-in-lhs": 2,
14+
"no-obj-calls": 2,
15+
"no-regex-spaces": 2,
16+
"no-sparse-arrays": 2,
17+
"no-unreachable": 2,
18+
"use-isnan": 2,
19+
"valid-typeof": 2,
20+
"camelcase": 2,
21+
"eqeqeq": 2,
22+
"no-plusplus": 2,
23+
"no-bitwise": 2,
24+
"block-scoped-var": 2,
25+
"consistent-return": 2,
26+
"curly": [
27+
2,
28+
"all"
29+
],
30+
"default-case": 2,
31+
"dot-notation": 2,
32+
"no-caller": 2,
33+
"no-div-regex": 2,
34+
"no-else-return": 2,
35+
"no-empty-label": 2,
36+
"no-eq-null": 2,
37+
"no-eval": 2,
38+
"no-extend-native": 2,
39+
"no-fallthrough": 2,
40+
"no-floating-decimal": 2,
41+
"no-implied-eval": 2,
42+
"no-labels": 2,
43+
"no-iterator": 2,
44+
"no-lone-blocks": 2,
45+
"no-loop-func": 2,
46+
"no-multi-str": 2,
47+
"no-native-reassign": 2,
48+
"no-new": 2,
49+
"no-new-func": 2,
50+
"no-new-wrappers": 2,
51+
"no-octal": 2,
52+
"no-octal-escape": 2,
53+
"no-proto": 2,
54+
"no-redeclare": 2,
55+
"no-return-assign": 2,
56+
"no-script-url": 2,
57+
"no-self-compare": 2,
58+
"no-sequences": 2,
59+
"no-unused-expressions": 2,
60+
"no-with": 2,
61+
"yoda": 2,
62+
"radix": 2,
63+
"wrap-iife": [
64+
2,
65+
"outside"
66+
],
67+
"strict": [2, "never"],
68+
"strict": 2,
69+
"no-catch-shadow": 2,
70+
"no-delete-var": 2,
71+
"no-label-var": 2,
72+
"no-shadow": 2,
73+
"no-shadow-restricted-names": 2,
74+
"no-undef": 2,
75+
"no-undef-init": 2,
76+
"no-unused-vars": [
77+
2,
78+
{
79+
"vars": "all",
80+
"args": "after-used"
81+
}
82+
],
83+
"no-use-before-define": 2,
84+
"brace-style": [
85+
2,
86+
"1tbs"
87+
],
88+
"consistent-this": [
89+
2,
90+
"that"
91+
],
92+
"new-cap": 2,
93+
"new-parens": 2,
94+
"no-nested-ternary": 2,
95+
"no-array-constructor": 2,
96+
"no-lonely-if": 2,
97+
"no-new-object": 2,
98+
"no-spaced-func": 2,
99+
"semi-spacing": 2,
100+
"no-underscore-dangle": 2,
101+
"no-extra-parens": 2,
102+
"quotes": [
103+
2,
104+
"single",
105+
"avoid-escape"
106+
],
107+
"quote-props": 2,
108+
"semi": [
109+
2,
110+
"always"
111+
],
112+
"space-after-keywords": [
113+
2,
114+
"always"
115+
],
116+
"object-curly-spacing": [
117+
2,
118+
"never"
119+
],
120+
"array-bracket-spacing": [
121+
2,
122+
"never"
123+
],
124+
"computed-property-spacing": [
125+
2,
126+
"never"
127+
],
128+
"space-infix-ops": 2,
129+
"space-return-throw-case": 2,
130+
"space-unary-ops": 2,
131+
"one-var": 2,
132+
"wrap-regex": 2,
133+
134+
"no-extra-boolean-cast": 1,
135+
"no-console": 1,
136+
"no-alert": 1,
137+
"no-empty-character-class": 1,
138+
"no-ex-assign": 1,
139+
"no-func-assign": 1,
140+
"valid-jsdoc": 1,
141+
"guard-for-in": 1,
142+
"no-warning-comments": [
143+
1,
144+
{
145+
"terms": ["todo", "fixme", "xxx"],
146+
"location": "anywhere"
147+
}
148+
],
149+
"func-style": [
150+
1,
151+
"expression"
152+
],
153+
"no-extra-parens": 1,
154+
"func-names": 1,
155+
156+
"no-ternary": 0,
157+
"sort-vars": 0
158+
}
159+
}

.jscsrc

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"validateIndentation": 2,
3+
"disallowAnonymousFunctions": true,
4+
"disallowCapitalizedComments": true,
5+
"disallowDanglingUnderscores": true,
6+
"disallowEmptyBlocks": true,
7+
"disallowFunctionDeclarations": true,
8+
"disallowImplicitTypeConversion": [
9+
"numeric",
10+
"binary",
11+
"string"
12+
],
13+
"disallowKeywordsOnNewLine": [
14+
"else"
15+
],
16+
"disallowKeywords": [
17+
"with"
18+
],
19+
"disallowMixedSpacesAndTabs": true,
20+
"disallowMultipleLineBreaks": true,
21+
"disallowMultipleLineStrings": true,
22+
"disallowMultipleSpaces": true,
23+
"disallowNewlineBeforeBlockStatements": true,
24+
"disallowNotOperatorsInConditionals": true,
25+
"disallowOperatorBeforeLineBreak": [
26+
".",
27+
"+"
28+
],
29+
"disallowSpacesInCallExpression": true,
30+
"disallowYodaConditions": true,
31+
"requireBlocksOnNewline": true,
32+
"requireCurlyBraces": [
33+
"if",
34+
"else",
35+
"for",
36+
"while",
37+
"do",
38+
"try",
39+
"catch",
40+
"case",
41+
"default"
42+
],
43+
"requireDotNotation": true,
44+
"requireLineBreakAfterVariableAssignment": true,
45+
"requireLineFeedAtFileEnd": true,
46+
"requireMultipleVarDecl": true,
47+
"requireNamedUnassignedFunctions": true,
48+
"requireOperatorBeforeLineBreak": [
49+
"?",
50+
"=",
51+
"+",
52+
"-",
53+
"/",
54+
"*",
55+
"==",
56+
"===",
57+
"!=",
58+
"!==",
59+
">",
60+
">=",
61+
"<",
62+
"<="
63+
],
64+
"requirePaddingNewLineAfterVariableDeclaration": true,
65+
"requirePaddingNewLinesAfterUseStrict": true,
66+
"requirePaddingNewLinesBeforeExport": true,
67+
"requirePaddingNewLinesInObjects": true,
68+
"requireParenthesesAroundIIFE": true,
69+
"requireQuotedKeysInObjects": true,
70+
"requireSpaceBetweenArguments": true,
71+
"requireSpacesInAnonymousFunctionExpression": {
72+
"beforeOpeningRoundBrace": true,
73+
"beforeOpeningCurlyBrace": true
74+
},
75+
"requireSpacesInForStatement": true,
76+
"requireSpacesInFunctionDeclaration": {
77+
"beforeOpeningCurlyBrace": true
78+
},
79+
"disallowSpacesInFunctionDeclaration": {
80+
"beforeOpeningRoundBrace": true
81+
},
82+
"requireSpacesInFunctionExpression": {
83+
"beforeOpeningCurlyBrace": true
84+
},
85+
"disallowSpacesInFunctionExpression": {
86+
"beforeOpeningRoundBrace": true
87+
},
88+
"requireSpacesInFunction": {
89+
"beforeOpeningCurlyBrace": true
90+
},
91+
"disallowSpacesInFunction": {
92+
"beforeOpeningRoundBrace": true
93+
},
94+
"requireSpacesInNamedFunctionExpression": {
95+
"beforeOpeningCurlyBrace": true
96+
},
97+
"disallowSpacesInNamedFunctionExpression": {
98+
"beforeOpeningRoundBrace": true
99+
},
100+
"safeContextKeyword": [
101+
"that"
102+
],
103+
"validateAlignedFunctionParameters": {
104+
"lineBreakAfterOpeningBraces": true
105+
}
106+
}

0 commit comments

Comments
 (0)