Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move eslint-config-kibana into core #12725

Merged
merged 38 commits into from
Jul 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5ac3b64
Initial commit
spalger Feb 9, 2016
8184893
added actual config
spalger Feb 9, 2016
2e07914
version 0.0.1
spalger Feb 9, 2016
f6d0902
version 0.0.2
spalger Feb 9, 2016
e4c7510
[no-const-assign] Disallow assignment to const
epixa Apr 1, 2016
6dbd10e
[no-redeclare] Disallow redeclaring variables
epixa Apr 1, 2016
9e48ff6
version 0.0.3
epixa Apr 1, 2016
461321d
[no-unused-vars]: Disallow declaration of variables that are not used…
cjcenizal Jul 5, 2016
29da50e
Merge pull request #1 from cjcenizal/7609/improvement/eslint-unused-vars
cjcenizal Jul 5, 2016
2cfe85c
Bump to 0.1.0.
cjcenizal Jul 5, 2016
04d1ebb
Merge pull request #2 from cjcenizal/chore/bump-0.1.0
cjcenizal Jul 5, 2016
d5b87d4
upgrade deps in preperation for babel6 transition
Aug 24, 2016
4a8b894
Merge pull request #3 from spalger/upgrade/all-deps
spalger Aug 24, 2016
52f42ec
0.2.0-alpha1
Aug 24, 2016
782b60f
use yaml for readability
Aug 25, 2016
09a0b2d
0.2.0
Aug 25, 2016
23e4747
update/pin peed dependency versions
spalger Dec 2, 2016
e6665ca
0.2.1
spalger Dec 2, 2016
d5b80bd
[quotes] allow template literals
spalger Dec 13, 2016
5f88089
0.2.2
spalger Dec 13, 2016
e55b573
add object-curly-spacing and no-global-assign rules
spalger Dec 14, 2016
9f25562
sort .eslintrc.yaml rules
spalger Dec 14, 2016
9c7da2f
0.3.0
spalger Dec 14, 2016
40652fb
add basic react support
spalger Mar 20, 2017
01ab7e4
0.4.0
spalger Mar 20, 2017
be8ad8f
Disallow using 'context' in tests
kimjoar Apr 3, 2017
6206dd6
Merge pull request #4 from kjbekkelund/disallow-context
kimjoar Apr 4, 2017
4244ba0
0.5.0
kimjoar Apr 4, 2017
e5883a0
move from .eslintrc.yaml to .eslintrc.js without .json generation (#6)
spalger Jun 1, 2017
ea0f6ae
Implement import plugin (#7)
spalger Jun 1, 2017
d8ba316
Dereference import config (#8)
spalger Jun 2, 2017
59a51e4
0.6.0
spalger Jun 2, 2017
07b3e3d
set environment info for import rule
spalger Jun 2, 2017
dd6461d
0.6.1
spalger Jun 2, 2017
3a71917
update peerDependencies
spalger Jun 24, 2017
317b3ac
0.7.0
spalger Jun 24, 2017
00a583d
Move eslint-config-kibana into packages directory
kimjoar Jul 9, 2017
4fbd3f2
Merge eslint-config-kibana into kibana repo
kimjoar Jul 11, 2017
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
109 changes: 109 additions & 0 deletions packages/eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
module.exports = {
parser: 'babel-eslint',

plugins: [
'mocha',
'babel',
'react',
'import'
],

env: {
es6: true,
amd: true,
node: true,
mocha: true,
browser: true,
},

parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: { experimentalObjectRestSpread: true },
},

rules: {
'block-scoped-var': 'error',
camelcase: [ 'error', { properties: 'never' } ],
'comma-dangle': 'off',
'comma-style': [ 'error', 'last' ],
'consistent-return': 'off',
curly: [ 'error', 'multi-line' ],
'dot-location': [ 'error', 'property' ],
'dot-notation': [ 'error', { allowKeywords: true } ],
eqeqeq: [ 'error', 'allow-null' ],
'guard-for-in': 'error',
indent: [ 'error', 2, { SwitchCase: 1 } ],
'key-spacing': [ 'off', { align: 'value' } ],
'max-len': [ 'error', 140, 2, { ignoreComments: true, ignoreUrls: true } ],
'new-cap': [ 'error', { capIsNewExceptions: [ 'Private' ] } ],
'no-bitwise': 'off',
'no-caller': 'error',
'no-cond-assign': 'off',
'no-const-assign': 'error',
'no-debugger': 'error',
'no-empty': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-parens': 'off',
'no-extra-semi': [ 'error' ],
'no-global-assign': 'error',
'no-irregular-whitespace': 'error',
'no-iterator': 'error',
'no-loop-func': 'error',
'no-multi-spaces': 'off',
'no-multi-str': 'error',
'no-nested-ternary': 'error',
'no-new': 'off',
'no-path-concat': 'off',
'no-proto': 'error',
'no-redeclare': 'error',
'no-restricted-globals': [ 'error', 'context' ],
'no-return-assign': 'off',
'no-script-url': 'error',
'no-sequences': 'error',
'no-shadow': 'off',
'no-trailing-spaces': 'error',
'no-undef': 'error',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': [ 'error' ],
'no-use-before-define': [ 'error', 'nofunc' ],
'no-var': 'error',
'no-with': 'error',
'one-var': [ 'error', 'never' ],
'prefer-const': 'error',
quotes: [ 'error', 'single', { allowTemplateLiterals: true } ],
'semi-spacing': [ 'error', { before: false, after: true } ],
semi: [ 'error', 'always' ],
'space-before-blocks': [ 'error', 'always' ],
'space-before-function-paren': [ 'error', { anonymous: 'always', named: 'never' } ],
'space-in-parens': [ 'error', 'never' ],
'space-infix-ops': [ 'error', { int32Hint: false } ],
'space-unary-ops': [ 'error' ],
strict: [ 'error', 'never' ],
'valid-typeof': 'error',
'wrap-iife': [ 'error', 'outside' ],
yoda: 'off',

'object-curly-spacing': 'off', // overriden with babel/object-curly-spacing
'babel/object-curly-spacing': [ 'error', 'always' ],

'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': 'error',

'mocha/handle-done-callback': 'error',
'mocha/no-exclusive-tests': 'error',

'import/no-unresolved': [ 'error', { 'amd': true, 'commonjs': true } ],
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/no-named-as-default': 'error',
'import/no-named-as-default-member': 'error',
'import/no-duplicates': 'error',
}
}
36 changes: 36 additions & 0 deletions packages/eslint-config-kibana/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
.eslintrc.json

yarn.lock
2 changes: 2 additions & 0 deletions packages/eslint-config-kibana/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.eslintrc.yaml
tasks
3 changes: 3 additions & 0 deletions packages/eslint-config-kibana/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# eslint-config-kibana

The eslint config used by the kibana team
28 changes: 28 additions & 0 deletions packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@elastic/eslint-config-kibana",
"version": "0.7.0",
"description": "The eslint config used by the kibana team",
"main": ".eslintrc.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/elastic/eslint-config-kibana.git"
},
"keywords": [],
"author": "Spencer Alger <[email protected]>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/elastic/eslint-config-kibana/issues"
},
"homepage": "https://github.com/elastic/eslint-config-kibana#readme",
"peerDependencies": {
"babel-eslint": "^7.2.3",
"eslint": "^4.1.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-mocha": "^4.9.0",
"eslint-plugin-react": "^7.0.1"
}
}