Skip to content

Commit 32a287c

Browse files
author
Sasha Sushko
authored
2.1.0
* Add old configs for backward compatibility
1 parent d1bcb07 commit 32a287c

File tree

8 files changed

+225
-3
lines changed

8 files changed

+225
-3
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.1.0 / 2021-01-27
2+
==================
3+
4+
* returned old configurations for backward compatibility for our inner tools. Please **don't use that configurations in real projects** they are deprecated.
5+
16
2.0.0 / 2021-01-20
27
==================
38

es5.5.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
extends: [`htmlacademy/es5`],
3+
rules: {
4+
'arrow-parens': [`error`, `always`],
5+
'constructor-super': `error`, // eslint:recommended
6+
'generator-star-spacing': [`error`, `after`],
7+
'no-new-symbol': `error`, // eslint:recommended
8+
'no-this-before-super': `error`, // eslint:recommended
9+
'prefer-rest-params': `error`,
10+
'prefer-spread': `error`,
11+
'rest-spread-spacing': `error`,
12+
'yield-star-spacing': [`error`, `after`],
13+
'no-var': `warn`,
14+
'object-shorthand': [`warn`, `always`, {'avoidQuotes': true}],
15+
'quotes': [`warn`, `backtick`]
16+
}
17+
};
18+

es5.js

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
module.exports = {
2+
rules: {
3+
// Possible Errors
4+
// http://eslint.org/docs/rules/#possible-errors
5+
// ---------------------------------------------
6+
'no-cond-assign': 'error', // eslint:recommended
7+
'no-irregular-whitespace': 'error', // eslint:recommended
8+
'no-unexpected-multiline': 'error', // eslint:recommended
9+
'valid-jsdoc': ['error', {
10+
requireParamDescription: false,
11+
requireReturnDescription: false,
12+
requireReturn: false,
13+
prefer: {returns: 'return'}
14+
}],
15+
'no-console': 'error',
16+
'no-constant-condition': 'error',
17+
'no-control-regex': 'error',
18+
'no-debugger': 'error',
19+
'no-dupe-keys': 'error',
20+
'no-dupe-args': 'error',
21+
'no-duplicate-case': 'error',
22+
'no-empty': 'error',
23+
'no-empty-character-class': 'error',
24+
'no-ex-assign': 'error',
25+
'no-extra-boolean-cast': 'error',
26+
'no-extra-semi': 'error',
27+
'no-func-assign': 'error',
28+
'no-inner-declarations': ['error', 'functions'],
29+
'no-invalid-regexp': 'error',
30+
'no-unsafe-negation': 'error',
31+
'no-obj-calls': 'error',
32+
'no-regex-spaces': 'error',
33+
'no-sparse-arrays': 'error',
34+
'no-unreachable': 'error',
35+
'use-isnan': 'error',
36+
'valid-typeof': 'error',
37+
38+
// Best Practices
39+
// http://eslint.org/docs/rules/#best-practices
40+
// --------------------------------------------
41+
42+
'guard-for-in': 'error',
43+
'max-nested-callbacks': ['error', {max: 3}],
44+
'no-caller': 'error',
45+
'no-extend-native': 'error',
46+
'no-extra-bind': 'error',
47+
'no-invalid-this': 'error',
48+
'no-multi-spaces': 'error',
49+
'no-multi-str': 'error',
50+
'no-new-wrappers': 'error',
51+
'no-throw-literal': 'error', // eslint:recommended
52+
'no-with': 'error',
53+
'consistent-return': 'error',
54+
'curly': ['error', 'all'],
55+
'eqeqeq': 'error',
56+
'no-alert': 'error',
57+
'no-eval': 'error',
58+
'no-fallthrough': 'error',
59+
'no-floating-decimal': 'error',
60+
'no-implied-eval': 'error',
61+
'no-iterator': 'error',
62+
'no-labels': 'error',
63+
'no-lone-blocks': 'error',
64+
'no-global-assign': 'error',
65+
'no-new': 'error',
66+
'no-new-func': 'error',
67+
'no-octal': 'error', // default
68+
'no-octal-escape': 'error',
69+
'no-proto': 'error',
70+
'no-redeclare': 'error', // default
71+
'no-return-assign': 'error',
72+
'no-script-url': 'error',
73+
'no-sequences': 'error',
74+
'no-unused-expressions': 'error',
75+
'radix': 'error',
76+
77+
// Strict Mode
78+
// http://eslint.org/docs/rules/#strict-mode
79+
// -----------------------------------------
80+
'strict': ['error', 'global'],
81+
82+
// Variables
83+
// http://eslint.org/docs/rules/#variables
84+
// ---------------------------------------
85+
'no-unused-vars': ['error', {args: 'after-used', argsIgnorePattern: '^_'}], // check that all args are used¬
86+
'no-delete-var': 'error', // eslint:recommended
87+
'no-label-var': 'error',
88+
'no-shadow': 'error',
89+
'no-shadow-restricted-names': 'error',
90+
'no-undef': 'error', // default
91+
'no-undef-init': 'error',
92+
'no-undefined': 'off', // https://github.com/htmlacademy/eslint-config-htmlacademy/issues/36
93+
94+
// Node.js and CommonJS
95+
// http://eslint.org/docs/rules/#nodejs-and-commonjs
96+
// -------------------------------------------------
97+
'no-process-exit': 'error',
98+
99+
// Stylistic Issues
100+
// http://eslint.org/docs/rules/#stylistic-issues
101+
// ----------------------------------------------
102+
'indent': ['error', 2, {
103+
SwitchCase: 1,
104+
// continuation indent
105+
VariableDeclarator: 1, // indent is multiplier * indent = 1 * 2
106+
MemberExpression: 'off', // https://github.com/htmlacademy/eslint-config-htmlacademy/issues/35
107+
FunctionDeclaration: {parameters: 2},
108+
FunctionExpression: {parameters: 2},
109+
CallExpression: {arguments: 2}
110+
}],
111+
'block-spacing': ['error', 'always'],
112+
'array-bracket-spacing': ['error', 'never'],
113+
'brace-style': 'error',
114+
'camelcase': 'error',
115+
'comma-dangle': ['error', 'only-multiline'],
116+
'comma-spacing': 'error',
117+
'comma-style': 'error',
118+
'computed-property-spacing': 'error',
119+
'eol-last': 'error',
120+
'func-call-spacing': 'error',
121+
'key-spacing': 'error',
122+
'keyword-spacing': 'error',
123+
'linebreak-style': 'off', // check this in git
124+
'new-cap': 'error',
125+
'no-array-constructor': 'error',
126+
'no-mixed-spaces-and-tabs': 'error', // eslint:recommended
127+
'no-multiple-empty-lines': ['error', {max: 2}],
128+
'no-new-object': 'error',
129+
'no-trailing-spaces': 'error',
130+
'object-curly-spacing': 'error',
131+
'one-var': ['error', {
132+
var: 'never',
133+
let: 'never',
134+
const: 'never'
135+
}],
136+
'padded-blocks': ['off', 'never'],
137+
'quote-props': ['error', 'consistent'],
138+
'quotes': ['error', 'single', {allowTemplateLiterals: true}],
139+
'semi-spacing': 'error',
140+
'semi': 'error',
141+
'space-in-parens': ['error', 'never'],
142+
'space-before-blocks': 'error',
143+
'space-before-function-paren': ['error', {named: 'never', anonymous: 'always'}],
144+
'spaced-comment': ['error', 'always'],
145+
'unicode-bom': 'warn',
146+
'new-parens': 'error',
147+
'no-nested-ternary': 'error',
148+
'space-infix-ops': 'error',
149+
'space-unary-ops': ['error', {words: true, nonwords: false}],
150+
'yoda': ['error', 'never']
151+
}
152+
};

es6.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
extends: [`htmlacademy/es5`],
3+
rules: {
4+
// ECMAScript 6
5+
// http://eslint.org/docs/rules/#ecmascript-6
6+
// ------------------------------------------
7+
'arrow-parens': [`error`, `always`],
8+
// parens are optional but recommended.
9+
// ESLint doesn't support a *consistent*
10+
// setting so "always" is used.
11+
'constructor-super': `error`, // eslint:recommended
12+
'generator-star-spacing': [`error`, `after`],
13+
'no-new-symbol': `error`, // eslint:recommended
14+
'no-this-before-super': `error`, // eslint:recommended
15+
'no-var': `error`,
16+
'prefer-rest-params': `error`,
17+
'prefer-spread': `error`,
18+
'rest-spread-spacing': `error`,
19+
'yield-star-spacing': [`error`, `after`],
20+
21+
'object-shorthand': [`error`, `always`, {'avoidQuotes': true}],
22+
23+
'quotes': [`error`, `backtick`] // https://github.com/htmlacademy/eslint-config-htmlacademy/issues/4
24+
}
25+
};
26+

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
module.exports = {
2-
depends: ['htmlacademy/vanilla']
2+
depends: [
3+
'htmlacademy/es5',
4+
'htmlacademy/es5.5',
5+
'htmlacademy/es6',
6+
'htmlacademy/node',
7+
'htmlacademy/vanilla'
8+
]
39
};

node.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: [`htmlacademy/es6`],
3+
rules: {
4+
// Node.js
5+
// Specific overridden rules
6+
// ------------------------------------------
7+
'no-console': `off`,
8+
'no-process-exit': `off`
9+
}
10+
};
11+

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"name": "eslint-config-htmlacademy",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "ESLint shareable config for the HTML Academy style",
55
"files": [
6+
"es5.js",
7+
"es5.5.js",
8+
"es6.js",
9+
"node.js",
610
"vanilla.js",
711
"index.js"
812
],

0 commit comments

Comments
 (0)