mirror of
https://github.com/vale981/Vulcan
synced 2025-03-04 17:21:37 -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",
|
||||
"env": {
|
||||
/* Allows global vars from the Meteor environment to pass and enables certain rules */
|
||||
"meteor": true
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
|
||||
/* ---------------- Rules relaxed for Meteor's sake --------------------- */
|
||||
|
||||
/* allows use of var (remove when we are ready to switch to ES6) */
|
||||
"no-var": 0,
|
||||
|
||||
/* allows anonymous functions */
|
||||
"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 */
|
||||
"babel/generator-star-spacing": 0,
|
||||
"babel/new-cap": 1,
|
||||
"babel/array-bracket-spacing": 0,
|
||||
"babel/object-curly-spacing": 0,
|
||||
"babel/object-shorthand": 0,
|
||||
"babel/arrow-parens": 0,
|
||||
"babel/no-await-in-loop": 1,
|
||||
"comma-dangle": 0,
|
||||
|
||||
/* allows certain non-constructor functions to start with a capital letter, */
|
||||
"new-cap": [2, { "capIsNewExceptions": [
|
||||
"Match", "Any", "Object", "ObjectIncluding", "OneOf", "Optional", "Where"
|
||||
]}],
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
"key-spacing": 0,
|
||||
"no-extra-boolean-cast": 0,
|
||||
"no-undef": 1,
|
||||
"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
|
||||
*.scssc
|
||||
.sass-cache/*
|
||||
|
@ -44,4 +45,4 @@ node_modules
|
|||
bundle.tar.gz
|
||||
|
||||
jsdoc-conf.json
|
||||
jsdoc.json
|
||||
jsdoc.json
|
||||
|
|
10
package.json
10
package.json
|
@ -4,6 +4,9 @@
|
|||
"engines": {
|
||||
"npm": "^3.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --cache packages"
|
||||
},
|
||||
"dependencies": {
|
||||
"bcrypt": "^0.8.7",
|
||||
"bootstrap": "^4.0.0-alpha.2",
|
||||
|
@ -42,7 +45,12 @@
|
|||
},
|
||||
"private": true,
|
||||
"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": {
|
||||
"plugins": {
|
||||
|
|
Loading…
Add table
Reference in a new issue