Skip to content

Commit

Permalink
move from .eslintrc.yaml to .eslintrc.js without .json generation (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger authored Jun 1, 2017
1 parent 4244ba0 commit e5883a0
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 104 deletions.
90 changes: 90 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
module.exports = {
parser: 'babel-eslint',

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

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

rules: {
'babel/object-curly-spacing': [ 'error', 'always' ],
'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 } ],
'mocha/handle-done-callback': 'error',
'mocha/no-exclusive-tests': 'error',
'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',
'object-curly-spacing': 'off', // overriden with babel/object-curly-spacing
'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',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': 'error',
}
}
86 changes: 0 additions & 86 deletions .eslintrc.yaml

This file was deleted.

10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
"name": "@elastic/eslint-config-kibana",
"version": "0.5.0",
"description": "The eslint config used by the kibana team",
"main": ".eslintrc.json",
"main": ".eslintrc.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "node tasks/writejson.js"
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
Expand All @@ -22,10 +21,7 @@
"eslint": "3.11.1",
"eslint-plugin-mocha": "4.7.0",
"eslint-plugin-babel": "4.0.0",
"babel-eslint": "6.1.2"
},
"devDependencies": {
"eslint-plugin-react": "^6.10.3",
"js-yaml": "^3.6.1"
"babel-eslint": "6.1.2"
}
}
11 changes: 0 additions & 11 deletions tasks/writejson.js

This file was deleted.

0 comments on commit e5883a0

Please sign in to comment.