Skip to content

Commit

Permalink
add some linter and a bable files;
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1th committed May 23, 2017
1 parent bd89031 commit cd2968e
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
"react",
"es2015",
"stage-2"
],
"plugins": [
"transform-class-properties",
"transform-es2015-modules-commonjs"
]
}
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false
insert_final_newline = false
51 changes: 51 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"rules": {
"linebreak-style": [2, "unix"],
"eol-last": 1,
"quotes": [1, "single", "avoid-escape"],
"semi": [2, "always"],
"camelcase": [2, {
"properties": "never"
}],
"brace-style": [1, "1tbs", {
"allowSingleLine": true
}],
"no-nested-ternary": 1,
"no-unused-vars": [2, {
"argsIgnorePattern": "event"
}],
"no-console": 0,
"max-depth": [2, 4],
"dot-notation": 1,
"eqeqeq": 2,
"no-implied-eval": 2,
"no-loop-func": 1,
"radix": 2,
"no-magic-numbers": [1, {
"ignore": [0, 1, 2, -1, 10]
}],
"complexity": [2, 10],
"yoda": [2, "never"]
},
"env": {
"browser": true,
"node": true,
"es6": true,
"webextensions": true
},
"globals": {
"config": true,
"import": true,
"Promise": true,
"React": true,
"moment": true
},
"parserOptions": {
"sourceType": "module"
},
"extends": "eslint:recommended",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
}
46 changes: 46 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
severity: error

linters:

BorderZero:
enabled: true
convention: zero

BemDepth:
enabled: true

DeclarationOrder:
enabled: false

ExtendDirective:
enabled: true

LeadingZero:
enabled: false

NameFormat:
enabled: true

PrivateNamingConvention:
enabled: true
prefix: _

PropertySortOrder:
enabled: false

QualifyingElement:
enabled: false

SelectorFormat:
enabled: true
convention: hyphenated_BEM
class_convention: ^(?!js-).*
class_convention_explanation: should not be written in the form js-*

SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: false

StringQuotes:
enabled: true
style: single_quotes
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"bowser": "^1.6.0",
"react": "^15.5.4",
"react-anime": "^0.3.4",
"react-dom": "^15.5.4"
"react-dom": "^15.5.4",
"scroll-to": "0.0.2"
}
}

0 comments on commit cd2968e

Please sign in to comment.