mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
add eslint with basic plugins and configuration. fixes #1470
This commit is contained in:
parent
01429c9f5b
commit
8db19a1c6c
3 changed files with 45 additions and 40 deletions
72
.eslintrc
72
.eslintrc
|
@ -1,44 +1,40 @@
|
||||||
/* Galaxy's Javascript linting configuration (Meteor)
|
|
||||||
*
|
|
||||||
* Documentation on rules can be found at:
|
|
||||||
* http://eslint.org/docs/rules/ <- Optionally append the rulename
|
|
||||||
*
|
|
||||||
* Ensure changes are kept in sync with the base linting configuration.
|
|
||||||
*/
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"extends": ".eslintrc-meteor",
|
"extends": [
|
||||||
"env": {
|
"eslint:recommended"
|
||||||
/* Allows global vars from the Meteor environment to pass and enables certain rules */
|
],
|
||||||
"meteor": true
|
"parser": "babel-eslint",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 6,
|
||||||
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"babel/generator-star-spacing": 0,
|
||||||
/* ---------------- Rules relaxed for Meteor's sake --------------------- */
|
"babel/new-cap": 1,
|
||||||
|
"babel/array-bracket-spacing": 0,
|
||||||
/* allows use of var (remove when we are ready to switch to ES6) */
|
"babel/object-curly-spacing": 0,
|
||||||
"no-var": 0,
|
"babel/object-shorthand": 0,
|
||||||
|
"babel/arrow-parens": 0,
|
||||||
/* allows anonymous functions */
|
"babel/no-await-in-loop": 1,
|
||||||
"func-names": 0,
|
|
||||||
|
|
||||||
/* allows var = function() delcarations */
|
|
||||||
"func-style": 0,
|
|
||||||
|
|
||||||
/* relaxes max-len to 100 chars per line */
|
|
||||||
"max-len": [2, 100, 2],
|
|
||||||
|
|
||||||
/* relaxes requirement to put all vars at the top of the scope */
|
|
||||||
"vars-on-top": 0,
|
|
||||||
|
|
||||||
/* relaxes dangling commas enforcement */
|
|
||||||
"comma-dangle": 0,
|
"comma-dangle": 0,
|
||||||
|
"key-spacing": 0,
|
||||||
/* allows certain non-constructor functions to start with a capital letter, */
|
"no-extra-boolean-cast": 0,
|
||||||
"new-cap": [2, { "capIsNewExceptions": [
|
"no-undef": 1,
|
||||||
"Match", "Any", "Object", "ObjectIncluding", "OneOf", "Optional", "Where"
|
"no-unused-vars": 1,
|
||||||
]}],
|
"no-console": 1
|
||||||
|
},
|
||||||
/* ---------------------------------------------------------------------- */
|
"env": {
|
||||||
|
"es6": true,
|
||||||
|
"node": true,
|
||||||
|
"browser": true,
|
||||||
|
"commonjs": true
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"babel",
|
||||||
|
],
|
||||||
|
"modules": true,
|
||||||
|
"root": true,
|
||||||
|
"globals": {
|
||||||
|
"param": true,
|
||||||
|
"returns": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
.eslintcache
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
*.scssc
|
*.scssc
|
||||||
.sass-cache/*
|
.sass-cache/*
|
||||||
|
@ -44,4 +45,4 @@ node_modules
|
||||||
bundle.tar.gz
|
bundle.tar.gz
|
||||||
|
|
||||||
jsdoc-conf.json
|
jsdoc-conf.json
|
||||||
jsdoc.json
|
jsdoc.json
|
||||||
|
|
10
package.json
10
package.json
|
@ -4,6 +4,9 @@
|
||||||
"engines": {
|
"engines": {
|
||||||
"npm": "^3.0"
|
"npm": "^3.0"
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "eslint --cache packages"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bcrypt": "^0.8.7",
|
"bcrypt": "^0.8.7",
|
||||||
"bootstrap": "^4.0.0-alpha.2",
|
"bootstrap": "^4.0.0-alpha.2",
|
||||||
|
@ -42,7 +45,12 @@
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^6.3.6"
|
"autoprefixer": "^6.3.6",
|
||||||
|
"babel-eslint": "^7.0.0",
|
||||||
|
"eslint": "^3.8.0",
|
||||||
|
"eslint-config-meteor": "0.0.9",
|
||||||
|
"eslint-plugin-babel": "^3.3.0",
|
||||||
|
"eslint-plugin-meteor": "^4.0.1"
|
||||||
},
|
},
|
||||||
"postcss": {
|
"postcss": {
|
||||||
"plugins": {
|
"plugins": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue