Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = {
'root': true,
'env': {
'node': true,
'commonjs': true,
'es6': true,
},
'extends': 'eslint:recommended',
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
},
'parserOptions': {
'ecmaVersion': 2018,
},
'rules': {
'no-console': 'off',
'no-unused-vars': ['warn', { 'ignoreRestSiblings': true }],
'no-var': 'error',
'no-return-assign': 'error',
'no-return-await': 'error',
'no-multi-assign': 'error',
'eqeqeq': 'error',
'require-await': 'error',
'wrap-iife': ["error", "inside"],
'curly': ['error', 'all'],
'semi': 'error',
'func-style': ['error', 'expression'],
'newline-per-chained-call': 'warn',
'array-bracket-spacing': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],
'space-in-parens': ['error', 'always', { 'exceptions': ['empty'] }],
'block-spacing': ['error', 'always'],
'brace-style': ['error', 'stroustrup'],
'indent': ['error', 'tab', {
'ignoreComments': true,
}],
'arrow-spacing': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always',
}],
}
};
11 changes: 11 additions & 0 deletions eslintconfigs/module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
'env': {
'browser': true
},
'parserOptions': {
'ecmaVersion': 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'ecmaVersion': 5
'ecmaVersion': 5

I'm not confident this supports IE8-11 rules

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just forbid to use es6 syntax e.g. let, const, etc

},
'rules': {
'no-var': ['off']
}
};
10 changes: 10 additions & 0 deletions eslintconfigs/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
'plugins': [
'react'
],
'extends': 'plugin:react/recommended',
'parser': 'babel-eslint',
'parserOptions': {
'sourceType': 'module',
}
};
Loading