Skip to content

Commit ad82f18

Browse files
author
Vladimir Varankin
committed
Poehali!
0 parents  commit ad82f18

File tree

8 files changed

+140
-0
lines changed

8 files changed

+140
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Oppa Nodules Style
2+
3+
A set of linters configs for nodules.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# eslint-config-nodules
2+
3+
## Usage
4+
5+
1. `npm install --save-dev eslint eslint-config-nodules`;
6+
2. add `"extends": "nodules"` to your `.eslintrc`.
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = {
2+
'extends': 'eslint:recommended',
3+
'ecmaFeatures': {
4+
'blockBindings': true // enable let and const
5+
},
6+
'rules': {
7+
'indent': [2, 4],
8+
'quotes': [2, 'single'],
9+
'linebreak-style': [2, 'unix'],
10+
'semi': [2, 'always'],
11+
'block-scoped-var': 1,
12+
'curly': 2,
13+
'dot-notation': 1,
14+
'dot-location': [2, 'property'],
15+
'eqeqeq': [2, 'allow-null'],
16+
'guard-for-in': 2,
17+
'no-caller': 2,
18+
'no-eval': 2,
19+
'no-extend-native': 2,
20+
'no-extra-bind': 2,
21+
'no-multi-spaces': 2,
22+
'radix': 2,
23+
'yoda': [2, 'never'],
24+
'global-require': 1,
25+
'no-mixed-requires': 1
26+
}
27+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "eslint-config-nodules",
3+
"version": "0.1.1",
4+
"description": "eslint config for nodules",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git://github.com/nodules/style.git"
12+
},
13+
"keywords": [
14+
"eslint",
15+
"eslintconfig",
16+
"nodules",
17+
"styleguide"
18+
],
19+
"author": "Vladimir Varankin <[email protected]> (http://github.com/narqo)",
20+
"license": "WTFPL",
21+
"bugs": {
22+
"url": "https://github.com/nodules/style/issues"
23+
},
24+
"homepage": "https://github.com/nodules/style#readme",
25+
"devDependencies": {
26+
"eslint": "^1.9.0"
27+
},
28+
"peerDependencies": {
29+
"eslint": ">=1.0.0"
30+
}
31+
}
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# jscs-preset-nodules
2+
3+
## Usage
4+
5+
1. `npm install --save-dev jscs jscs-preset-nodules`;
6+
2. add `"preset": "nodules"` to your `.jscsrc`.
7+

packages/jscs-preset-nodules/index.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
'preset': 'yandex',
3+
'disallowSpaceAfterPrefixUnaryOperators': ['++', '--', '+', '-', '~'],
4+
5+
'disallowMultipleVarDecl': null,
6+
7+
'requireLineBreakAfterVariableAssignment': true,
8+
9+
'requireSpacesInAnonymousFunctionExpression': {
10+
'beforeOpeningCurlyBrace': true
11+
},
12+
13+
'disallowSpacesInsideParentheses': null,
14+
15+
'disallowSpacesInsideObjectBrackets': null,
16+
'requireSpacesInsideObjectBrackets': 'all',
17+
18+
'disallowSpacesInsideArrayBrackets': null,
19+
'requireSpacesInsideArrayBrackets': 'all',
20+
21+
'disallowQuotedKeysInObjects': null,
22+
23+
'disallowImplicitTypeConversion': ['string'],
24+
25+
'validateIndentation': null,
26+
27+
'validateParameterSeparator': ', ',
28+
29+
'jsDoc': {
30+
'checkParamNames': true,
31+
'requireParamTypes': true,
32+
'checkRedundantReturns': true,
33+
'requireReturnTypes': true
34+
}
35+
};
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "jscs-preset-nodules",
3+
"version": "0.1.0",
4+
"description": "jscs preset for nodules",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git://github.com/nodules/style.git"
12+
},
13+
"keywords": [
14+
"jscs",
15+
"nodules",
16+
"styleguide"
17+
],
18+
"author": "Vladimir Varankin <[email protected]> (http://github.com/narqo)",
19+
"license": "WTFPL",
20+
"bugs": {
21+
"url": "https://github.com/nodules/style/issues"
22+
},
23+
"homepage": "https://github.com/nodules/style#readme",
24+
"devDependencies": {
25+
"jscs": "^2.5.1"
26+
},
27+
"peerDependencies": {
28+
"jscs": ">=2.0.0"
29+
}
30+
}

0 commit comments

Comments
 (0)