Skip to content

Commit

Permalink
feat: changes eslint config + updates dependencies
Browse files Browse the repository at this point in the history
Creates new eslint config based on Airbnb`s one. Updates eslint versions and removes unused dependecies
  • Loading branch information
Rodrigo Solis committed Sep 10, 2017
1 parent ca531bd commit a3f56b6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 51 deletions.
7 changes: 3 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"presets": [
"latest",
"react"
"stage-3"
],
"plugins": [
"transform-object-rest-spread",
"transform-class-properties",
"transform-flow-strip-types"
"transform-flow-strip-types",
"jest"
]
}
39 changes: 3 additions & 36 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,14 @@
module.exports = {
parser: 'babel-eslint',
extends: ['formidable/configurations/es6'],
extends: ['airbnb-base'],
globals: {
Promise: true
},
env: {
node: true
},
ecmaFeatures: {
modules: true
},
rules: {
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
argsIgnorePattern: '^_'
}
],
'no-magic-numbers': 'off',
'no-invalid-this': 'off',
'no-unused-expressions': 'off',
'no-console': 'off',
quotes: ['error', 'single', { avoidEscape: true }],
indent: [
'error',
2,
{
SwitchCase: 1
}
],
'new-cap': 'off',
'func-style': 'off',
'generator-star-spacing': 'off',
'max-len': ['error', 100, { ignoreUrls: true }],
'max-params': 'off',
'comma-dangle': ['error', 'never'],
'arrow-parens': ['error', 'as-needed'],
eqeqeq: ['error', 'smart'],
'filenames/match-regex': 'off',
'filenames/match-exported': 'off',
'filenames/no-index': 'off'
'comma-dangle': 'off',
'import/prefer-default-export': ['warn']
}
};
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ jspm_packages
# Optional REPL history
.node_repl_history

.DS_Store
.DS_Store

# yarn.lock exists so don't commit package-lock.json
package-lock.json
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"flow:stop": "flow stop",
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"lint": "eslint src/",
"prepublish": "npm run test && npm run build",
"prepublish": "npm run lint && npm run flow && npm run test && npm run build",
"test": "jest",
"test:watch": "jest --watch",
"watch": "npm run build -- --watch"
Expand All @@ -31,17 +31,13 @@
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.8",
"babel-plugin-transform-class-properties": "^6.19.0",
"babel-plugin-transform-flow-strip-types": "^6.18.0",
"babel-plugin-transform-object-rest-spread": "^6.19.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-react": "^6.16.0",
"eslint": "^3.17.1",
"eslint-config-formidable": "^2.0.1",
"eslint": "^4.6.1",
"eslint-config-airbnb-base": "^12.0.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-filenames": "^1.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jest": "^21.0.2",
"flow-bin": "^0.42.0",
"jest": "^19.0.2",
"react": "^15.4.2",
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
/*global $Shape*/
/* global $Shape */
import type { Config } from './types';
import defaults from './defaults';

Expand Down

0 comments on commit a3f56b6

Please sign in to comment.