Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Update eslint and introduce prettier
  • Loading branch information
alubbe committed Jan 18, 2019
commit 4f0d9b64cf65b5a34ade4114f98ef1fb75f34154
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
build
dist
out
test
spec/manual/public/
spec/manual/public/
56 changes: 28 additions & 28 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{
"extends": "airbnb",
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "script"
},
"extends": [
"airbnb",
"prettier"
],
"parser": "babel-eslint",
"env": {
"es6": true
},
"rules": {
"max-len": [1, 160, 2, {"ignoreComments": true}],
"semi": ["error", "always"],
"object-property-newline": ["off", { "allowMultiplePropertiesPerLine": true }],
"comma-dangle": ["error", {"arrays": "always-multiline", "objects": "always-multiline", "imports": "always-multiline", "exports": "always-multiline", "functions": "never"}],
"func-names": ["off", "never"],
"space-before-function-paren": ["error", "never"],
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"global-require": ["off"],
"max-len": ["error", {"code": 160, "ignoreComments": true}],
"no-mixed-operators": ["error", {"allowSamePrecedence": true}],
"linebreak-style": ["off"],
"no-use-before-define": ["error", { "variables": false, "classes": false, "functions": false }],
"no-plusplus": ["off"],
"no-underscore-dangle": ["error", { "allowAfterThis": true, "allowAfterSuper": true }],
"no-multi-assign": ["off"],
"one-var": ["off"],
"one-var-declaration-per-line": ["off"],
"vars-on-top": ["off"],

"no-var": ["off"],
"arrow-parens": ["off"],
"no-prototype-builtins": ["off"],
"no-param-reassign": ["off"],
"prefer-arrow-callback": ["off"],
"comma-dangle": ["off"],
"strict": ["off"],
"indent": ["off"],
"object-shorthand": ["off"],
"prefer-template": ["off"],
"object-curly-spacing": ["off"],
"no-unused-expressions": ["off"],
"global-require": ["off"],
"no-path-concat": ["off"],
"prefer-rest-params": ["off"]
"no-plusplus": ["off"],
"no-prototype-builtins": ["off"],
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"no-underscore-dangle": ["error", { "allowAfterThis": true, "allowAfterSuper": true }],
"no-use-before-define": ["error", { "variables": false, "classes": false, "functions": false }],
"object-property-newline": ["off", { "allowMultiplePropertiesPerLine": true }],
"prefer-destructuring": ["warn"],
"prefer-rest-params": ["off"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"space-before-function-paren": ["error", "never"],
"strict": ["off"]
}
}
}
26 changes: 0 additions & 26 deletions .jshintrc

This file was deleted.

5 changes: 5 additions & 0 deletions .prettier
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"bracketSpacing": false,
"printWidth": 160,
"trailingComma": "all"
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
dist
out
spec/manual/public/
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"test:native-integration": "export EXCEL_NATIVE=yes && mocha --require spec/config/setup spec/integration --recursive",
"test:manual": "node spec/manual/app.js",
"clean-build": "npm run clean && npm run build",
"lint": "eslint --ext .js lib spec",
"lint": "eslint --format node_modules/eslint-friendly-formatter .",
"lint:fix": "prettier-eslint --write \"**/*.js\"",
"clean": "rm -rf build/ && rm -rf dist",
"build": "./node_modules/.bin/grunt build",
"preversion": "npm run clean && npm run build && npm run test:full",
Expand Down Expand Up @@ -69,7 +70,7 @@
"temp": "0.8.3"
},
"devDependencies": {
"babel-eslint": "^7.2.0",
"babel-eslint": "^10.0.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.22.0",
"bluebird": "^3.4.7",
Expand All @@ -78,11 +79,13 @@
"chai-datetime": "*",
"chai-xml": "*",
"dirty-chai": "^1.2.2",
"eslint": "^3.18.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.2",
"eslint-plugin-react": "^6.10.3",
"eslint": "5.6.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-config-prettier": "^3.0.1",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.6.1",
"express": "*",
"grunt": "^1.0.1",
"grunt-babel": "^6.0.0",
Expand All @@ -94,6 +97,8 @@
"grunt-lib-phantomjs": "^1.1.0",
"memorystream": "*",
"mocha": "*",
"prettier-eslint": "^8.8.1",
"prettier-eslint-cli": "^4.6.1",
"request": "*",
"semver": "*",
"uglifyjs": "^2.4.10"
Expand Down