Skip to content
Permalink
Browse files

Split out .babelrc and .eslintrc files, add in linting for vue compon…

…ents using vue-eslint-parser, cry at the amount of errors...
  • Loading branch information...
overshard committed Jun 29, 2018
1 parent d77c134 commit ac94829c94c2365b79be89cdb5b6a8f7e5ca0f99
Showing with 348 additions and 208 deletions.
  1. +13 −0 .babelrc
  2. +27 −0 .eslintrc
  3. +13 −51 gulpfile.js/tasks/linting.js
  4. +231 −82 package-lock.json
  5. +64 −75 package.json
@@ -0,0 +1,13 @@
{
"presets": [
"env",
"react",
"stage-0"
],
"plugins": [
"transform-class-properties",
"transform-decorators",
"transform-react-constant-elements",
"transform-react-inline-elements"
]
}
@@ -0,0 +1,27 @@
{
"rules": {
"indent": ["error", 4],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"]
},
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jquery": true
},
"parser": "vue-eslint-parser",
"extends": [
"plugin:vue/recommended",
"eslint:recommended"
],
"plugins": [
"vue"
],
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 6,
"sourceType": "module"
}
}
@@ -25,23 +25,18 @@ gulp.task('lint:python', function(cb) {


gulp.task('lint:sass', function() {
return gulp.src('static_src/sass/**/*.{scss|sass|css}')
.pipe(sasslint({
rules: {
'no-vendor-prefixes': 2,
'no-ids': 0,
'indentation': [
1,
{
'size': 4
}
],
'property-sort-order': 0,
'force-element-nesting': 0
}
}))
.pipe(sasslint.format())
.pipe(sasslint.failOnError());
// return gulp.src('client/static_src/components/**/*.vue')
// .pipe(sasslint({
// rules: {
// 'no-vendor-prefixes': 2,
// 'no-ids': 0,
// 'indentation': [1, {'size': 4}],
// 'property-sort-order': 0,
// 'force-element-nesting': 0,
// },
// }))
// .pipe(sasslint.format())
// .pipe(sasslint.failOnError());
});


@@ -50,40 +45,7 @@ gulp.task('lint:es', function() {
'gulpfile.js/**/*.js',
'client/static_src/**/*.js',
'client/static_src/components/**/*.vue'])
.pipe(eslint({
'rules': {
'indent': [
'error',
4
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
]
},
'globals': [
'$'
],
'env': {
'browser': true
},
'extends': 'eslint:recommended',
'plugins': [
'html'
],
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module'
}
}))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
Oops, something went wrong.

0 comments on commit ac94829

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.