Skip to content
This repository was archived by the owner on Jan 22, 2018. It is now read-only.

Commit 1912fbe

Browse files
author
Kamil Kisiela
committed
chore: add lint check and configuration
1 parent 54f237d commit 1912fbe

File tree

4 files changed

+27
-179
lines changed

4 files changed

+27
-179
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is Awesome: http://editorconfig.org
2+
3+
# Top-most EditorConfig file.
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file.
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
indent_style = space
12+
indent_size = 2
13+
trim_trailing_whitespace = true
14+
15+
# Don't trim whitespace in Markdown in order to be able
16+
# to do two spaces for line breaks.
17+
[*.md]
18+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

.eslintrc

Lines changed: 3 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,6 @@
11
{
2-
"parser": "babel-eslint",
3-
"extends": "eslint:recommended",
4-
"env": {
5-
"browser": true,
6-
"node": true,
7-
"meteor": true,
8-
"mongo": true,
9-
"jasmine": true,
10-
"es6": true
11-
},
2+
"extends": "./node_modules/mys-common-tools/.eslintrc",
123
"globals": {
13-
// thrid-party packages globals
14-
"angular2now": false,
15-
"angular": false
16-
},
17-
"rules": {
18-
"no-unused-vars": [
19-
1,
20-
{
21-
"vars": "all",
22-
"args": "after-used"
23-
}
24-
],
25-
"curly": 2,
26-
// Require Following Curly Brace Conventions
27-
"eqeqeq": 2,
28-
// Require === and !==
29-
"no-alert": 2,
30-
// Disallow Use of Alert
31-
"no-caller": 2,
32-
// Disallow Use of caller/callee
33-
"no-else-return": 2,
34-
// Disallow return in else
35-
"no-eval": 2,
36-
// Disallow eval()
37-
"no-implied-eval": 2,
38-
// Disallow Implied eval()
39-
"no-labels": 2,
40-
// Disallow use of labeled statements
41-
"no-lone-blocks": 2,
42-
// Disallow Unnecessary Nested Blocks
43-
"no-loop-func": 2,
44-
// Disallow Functions in Loops
45-
"no-magic-numbers": 1,
46-
// Disallow Magic Numbers
47-
"no-multi-spaces": 2,
48-
// Disallow multiple spaces
49-
"no-native-reassign": 2,
50-
// Disallow Reassignment of Native Objects
51-
"no-new-func": 2,
52-
// Disallow Function Constructor
53-
"no-new-wrappers": 2,
54-
// Disallow Primitive Wrapper Instances
55-
"no-new": 2,
56-
// Disallow new For Side Effects
57-
"no-param-reassign": 2,
58-
// Disallow Reassignment of Function Parameters
59-
"no-proto": 2,
60-
// Disallow Use of __proto__
61-
"no-return-assign": 2,
62-
// Disallow Assignment in return Statement
63-
"no-script-url": 2,
64-
// Disallow use of javascript: urls
65-
"no-self-compare": 2,
66-
// Disallow comparisons where both sides are exactly the same
67-
"no-throw-literal": 2,
68-
// Restrict what can be thrown as an exception
69-
"no-unused-expressions": 2,
70-
// Disallow usage of expressions in statement position
71-
"no-useless-call": 2,
72-
// Disallow unnecessary .call() and .apply()
73-
"no-useless-concat": 2,
74-
// Disallow unnecessary concatenation of literals or template literals
75-
"no-void": 2,
76-
// Disallow use of the void operator
77-
"no-with": 2,
78-
// No with statements
79-
"vars-on-top": 2,
80-
// Require Variable Declarations to be at the top of their scope
81-
"wrap-iife": 2,
82-
// Require immediate function invocation to be wrapped in parentheses
83-
"array-bracket-spacing": [
84-
2,
85-
"never"
86-
],
87-
// Disallow or enforce spaces inside of brackets
88-
"block-spacing": [
89-
2,
90-
"always"
91-
],
92-
// Disallow or enforce spaces inside of single line blocks
93-
"camelcase": [
94-
2,
95-
{
96-
"properties": "always"
97-
}
98-
],
99-
// Require Camelcase
100-
"comma-spacing": [
101-
2,
102-
{
103-
"before": false,
104-
"after": true
105-
}
106-
],
107-
// Enforces spacing around commas
108-
"computed-property-spacing": [
109-
2,
110-
"never"
111-
],
112-
// Disallow or enforce spaces inside of computed properties
113-
"consistent-this": [
114-
2,
115-
"self"
116-
],
117-
// Require Consistent This
118-
"max-nested-callbacks": [
119-
2,
120-
3
121-
],
122-
// Set Maximum Depth of Nested Callbacks
123-
"new-parens": 2,
124-
// Require Parens for Constructors
125-
"newline-after-var": 2,
126-
// Require or disallow an empty newline after variable declarations
127-
"no-array-constructor": 2,
128-
// Disallow creation of dense arrays using the Array constructor
129-
"no-inline-comments": 2,
130-
// Disallows comments after code. Comments must come on their own lines
131-
"no-multiple-empty-lines": [
132-
2,
133-
{
134-
"max": 2
135-
}
136-
],
137-
// Disallows multiple blank lines
138-
"no-nested-ternary": 2,
139-
// Disallow Nested Ternaries
140-
"no-new-object": 2,
141-
// Disallow the use of the Object constructor
142-
"no-unneeded-ternary": 2,
143-
// Disallow conditional expressions that can be expressed with simpler constructs
144-
"object-curly-spacing": [
145-
2,
146-
"never"
147-
],
148-
// Disallow or enforce spaces inside of curly braces in objects.
149-
"one-var": [
150-
2,
151-
"never"
152-
],
153-
// Require or Disallow One Variable Declaration per Scope
154-
"wrap-regex": 2,
155-
// Require Regex Literals to be Wrapped
156-
"arrow-parens": [
157-
2,
158-
"always"
159-
],
160-
// Require parens in arrow function arguments
161-
"constructor-super": 2,
162-
// Verify calls of super() in constructors
163-
"no-class-assign": 2,
164-
// Disallow modifying variables of class declarations
165-
"no-const-assign": 2,
166-
// Disallow modifying variables that are declared using const
167-
"no-dupe-class-members": 2,
168-
// Disallow duplicate name in class members
169-
"no-this-before-super": 2,
170-
// Disallow use of this/super before calling super() in constructors
4+
"inject": false
1715
}
172-
}
6+
}

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"build:dist": "webpack --progress --colors --set-env-NODE_ENV=development",
88
"build:prod": "webpack --progress --colors --set-env-NODE_ENV=production",
99
"build": "npm run build:dist & npm run build:prod",
10+
"lint:src": "eslint src/**/*.js",
11+
"lint:tests": "eslint tests/**/*.js --no-ignore",
12+
"lint": "npm run lint:src & npm run lint:tests",
1013
"coverage:codecov": "cat ./coverage/lcov.info | node_modules/.bin/codecov",
1114
"coverage:coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
1215
"coverage:codacy": "cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage",
@@ -45,6 +48,9 @@
4548
"babel": "^5.8.3",
4649
"babel-core": "^5.0.0",
4750
"babel-loader": "^5.3.2",
51+
"babel-eslint": "^4.1.6",
52+
"eslint": "^1.10.3",
53+
"mys-common-tools": "latest",
4854
"codacy-coverage": "^1.1.3",
4955
"codecov.io": "^0.1.6",
5056
"coveralls": "^2.11.4",

0 commit comments

Comments
 (0)