Skip to content

Commit cd2968e

Browse files
author
mat1th
committed
add some linter and a bable files;
1 parent bd89031 commit cd2968e

File tree

5 files changed

+124
-1
lines changed

5 files changed

+124
-1
lines changed

.babelrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [
3+
"react",
4+
"es2015",
5+
"stage-2"
6+
],
7+
"plugins": [
8+
"transform-class-properties",
9+
"transform-es2015-modules-commonjs"
10+
]
11+
}

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = false
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
insert_final_newline = false

.eslintrc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"rules": {
3+
"linebreak-style": [2, "unix"],
4+
"eol-last": 1,
5+
"quotes": [1, "single", "avoid-escape"],
6+
"semi": [2, "always"],
7+
"camelcase": [2, {
8+
"properties": "never"
9+
}],
10+
"brace-style": [1, "1tbs", {
11+
"allowSingleLine": true
12+
}],
13+
"no-nested-ternary": 1,
14+
"no-unused-vars": [2, {
15+
"argsIgnorePattern": "event"
16+
}],
17+
"no-console": 0,
18+
"max-depth": [2, 4],
19+
"dot-notation": 1,
20+
"eqeqeq": 2,
21+
"no-implied-eval": 2,
22+
"no-loop-func": 1,
23+
"radix": 2,
24+
"no-magic-numbers": [1, {
25+
"ignore": [0, 1, 2, -1, 10]
26+
}],
27+
"complexity": [2, 10],
28+
"yoda": [2, "never"]
29+
},
30+
"env": {
31+
"browser": true,
32+
"node": true,
33+
"es6": true,
34+
"webextensions": true
35+
},
36+
"globals": {
37+
"config": true,
38+
"import": true,
39+
"Promise": true,
40+
"React": true,
41+
"moment": true
42+
},
43+
"parserOptions": {
44+
"sourceType": "module"
45+
},
46+
"extends": "eslint:recommended",
47+
"ecmaFeatures": {
48+
"jsx": true,
49+
"modules": true
50+
}
51+
}

.sass-lint.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
severity: error
2+
3+
linters:
4+
5+
BorderZero:
6+
enabled: true
7+
convention: zero
8+
9+
BemDepth:
10+
enabled: true
11+
12+
DeclarationOrder:
13+
enabled: false
14+
15+
ExtendDirective:
16+
enabled: true
17+
18+
LeadingZero:
19+
enabled: false
20+
21+
NameFormat:
22+
enabled: true
23+
24+
PrivateNamingConvention:
25+
enabled: true
26+
prefix: _
27+
28+
PropertySortOrder:
29+
enabled: false
30+
31+
QualifyingElement:
32+
enabled: false
33+
34+
SelectorFormat:
35+
enabled: true
36+
convention: hyphenated_BEM
37+
class_convention: ^(?!js-).*
38+
class_convention_explanation: should not be written in the form js-*
39+
40+
SingleLinePerProperty:
41+
enabled: true
42+
allow_single_line_rule_sets: false
43+
44+
StringQuotes:
45+
enabled: true
46+
style: single_quotes

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"bowser": "^1.6.0",
6767
"react": "^15.5.4",
6868
"react-anime": "^0.3.4",
69-
"react-dom": "^15.5.4"
69+
"react-dom": "^15.5.4",
70+
"scroll-to": "0.0.2"
7071
}
7172
}

0 commit comments

Comments
 (0)