Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
✅ Add lint
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Feb 17, 2017
1 parent 74b4a0b commit ea247ee
Show file tree
Hide file tree
Showing 5 changed files with 832 additions and 33 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/*.js
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
},
extends: 'vue',
// add your custom rules here
'rules': {
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'comma-dangle': ['error', 'always-multiline'],
},
}
29 changes: 27 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
{
"name": "vue-mdc",
"version": "1.0.0",
"main": "index.js",
"version": "2.0.0-alpha.1",
"main": "dist/vue-mdc.common.js",
"browser": "dist/vue-mdc.js",
"unpkg": "dist/vue-mdc.js",
"style": "dist/vue-mdc.css",
"author": "Eduardo San Martin Morote <[email protected]>",
"license": "MIT",
"files": [
"dist",
"src"
],
"scripts": {
"dev": "webpack-dashboard -- webpack-dev-server --config build/webpack.config.dev.js --open",
"test": "yon run lint && yon run test:unit",
"test:unit": "cross-env BABEL_ENV=test karma start test/karma.conf.js --single-run",
"build:dll": "webpack --progress --config build/webpack.config.dll.js",
"postinstall": "yon run build:dll",
"lint": "eslint --ext js --ext jsx --ext vue src test/**/*.spec.js test/*.js build",
"lint:fix": "yon run lint -- --fix",
"lint:staged": "lint-staged",
"build": "yon run build:common && yon run build:browser && yon run build:browser:min",
"build:browser": "cross-env NODE_ENV=browser yon run build:browser:base",
"build:browser:base": "webpack --config build/webpack.config.browser.js --progress --hide-modules",
"build:browser:min": "cross-env NODE_ENV=production yon build:browser:base -- -p",
"build:common": "cross-env NODE_ENV=common webpack --config build/webpack.config.common.js --progress --hide-modules"
},
"lint-staged": {
"*.{vue,jsx,js}": [
"eslint --fix",
"git add"
]
},
"pre-commit": "lint:staged",
"devDependencies": {
"add-asset-html-webpack-plugin": "^1.0.2",
"babel-core": "^6.23.1",
"babel-eslint": "^7.1.1",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.3.2",
"babel-plugin-istanbul": "^4.0.0",
Expand All @@ -29,7 +48,11 @@
"chai": "^3.5.0",
"cross-env": "^3.1.4",
"css-loader": "^0.26.1",
"eslint": "^3.15.0",
"eslint-config-vue": "^2.0.2",
"eslint-plugin-vue": "^2.0.1",
"extract-text-webpack-plugin": "beta",
"function-bind": "^1.1.0",
"html-webpack-plugin": "^2.28.0",
"karma": "^1.4.1",
"karma-coverage": "^1.1.1",
Expand All @@ -39,10 +62,12 @@
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.26",
"karma-webpack": "^2.0.2",
"lint-staged": "^3.3.0",
"material-components-web": "^0.4.0",
"mocha": "^3.2.0",
"mocha-css": "^1.0.1",
"node-sass": "^4.5.0",
"pre-commit": "^1.2.2",
"sass-loader": "^6.0.1",
"sinon": "^1.17.7",
"sinon-chai": "^2.8.0",
Expand Down
9 changes: 9 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"env": {
"mocha": true
},
"globals": {
"expect": true,
"sinon": true
}
}
Loading

0 comments on commit ea247ee

Please sign in to comment.