1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-11 05:40:11 +02:00

use some common joyent lint rules

This commit is contained in:
Sérgio Ramos 2016-10-26 10:51:06 +01:00
parent dedab3f03f
commit 8733a60acb
9 changed files with 84 additions and 11 deletions

View File

@ -1,5 +1,8 @@
{ {
"extends": "semistandard", "extends": [
"semistandard",
"eslint:recommended"
],
"parser": "babel-eslint", "parser": "babel-eslint",
"parserOptions": { "parserOptions": {
"ecmaVersion": 7, "ecmaVersion": 7,
@ -13,6 +16,11 @@
"react", "react",
"jsx-a11y" "jsx-a11y"
], ],
"env": {
"node": true,
"browser": true,
"es6": true
},
"rules": { "rules": {
"react/jsx-no-undef": 2, "react/jsx-no-undef": 2,
"react/jsx-uses-react": 2, "react/jsx-uses-react": 2,
@ -95,6 +103,25 @@
}], }],
"sort-vars": [2, { "sort-vars": [2, {
"ignoreCase": true "ignoreCase": true
}] }],
"prefer-const": 2,
"no-mixed-spaces-and-tabs": 2,
"new-cap": 2,
"no-use-before-define": [2, "nofunc"],
"semi": [2, "always"],
"camelcase": 2,
"curly": 2,
"eqeqeq": 2,
"no-extend-native": 2,
"indent": [2, 2, {
"SwitchCase": 1
}],
"quotes": [2, "single"],
"max-depth": [2, 3],
"max-statements": [2, 60],
"max-len": [2, 80],
"no-eq-null": 2,
"block-scoped-var": 2,
"no-console": 0
} }
} }

View File

@ -69,7 +69,12 @@ exports.config = {
], ],
loader: ExtractTextPlugin.extract({ loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader', fallbackLoader: 'style-loader',
loader: 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader' loader: [
'css-loader?',
'modules&importLoaders=1&',
'localIdentName=[name]__[local]___[hash:base64:5]!',
'postcss-loader'
].join('')
}) })
}] }]
} }

View File

@ -12,7 +12,12 @@ module.exports = {
module: { module: {
loaders: [{ loaders: [{
test: /\.css?$/, test: /\.css?$/,
loader: 'style-loader!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader' loader: [
'css-loader?',
'modules&importLoaders=1&',
'localIdentName=[name]__[local]___[hash:base64:5]!',
'postcss-loader'
].join('')
}] }]
} }
}; };

View File

@ -1,5 +1,8 @@
{ {
"extends": "semistandard", "extends": [
"semistandard",
"eslint:recommended"
],
"parser": "babel-eslint", "parser": "babel-eslint",
"parserOptions": { "parserOptions": {
"ecmaVersion": 7, "ecmaVersion": 7,
@ -13,6 +16,11 @@
"react", "react",
"jsx-a11y" "jsx-a11y"
], ],
"env": {
"node": true,
"browser": true,
"es6": true
},
"rules": { "rules": {
"react/jsx-no-undef": 2, "react/jsx-no-undef": 2,
"react/jsx-uses-react": 2, "react/jsx-uses-react": 2,
@ -95,6 +103,24 @@
}], }],
"sort-vars": [2, { "sort-vars": [2, {
"ignoreCase": true "ignoreCase": true
}] }],
"prefer-const": 2,
"no-mixed-spaces-and-tabs": 2,
"new-cap": 2,
"no-use-before-define": [2, "nofunc"],
"semi": [2, "always"],
"camelcase": 2,
"curly": 2,
"eqeqeq": 2,
"no-extend-native": 2,
"indent": [2, 2, {
"SwitchCase": 1
}],
"quotes": [2, "single"],
"max-depth": [2, 3],
"max-statements": [2, 60],
"max-len": [2, 80],
"no-eq-null": 2,
"block-scoped-var": 2
} }
} }

View File

@ -1,6 +1,6 @@
/* /*
* based on * based on
* https://github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Col.js * github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Col.js
*/ */
const flatten = require('lodash.flatten'); const flatten = require('lodash.flatten');

View File

@ -1,6 +1,6 @@
/* /*
* based on * based on
* https://github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Grid.js * github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Grid.js
*/ */
const React = require('react'); const React = require('react');

View File

@ -1,6 +1,6 @@
/* /*
* based on * based on
* https://github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Row.js * github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Row.js
*/ */
const flatten = require('lodash.flatten'); const flatten = require('lodash.flatten');

View File

@ -75,7 +75,12 @@ exports.config = {
], ],
loader: ExtractTextPlugin.extract({ loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader', fallbackLoader: 'style-loader',
loader: 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader' loader: [
'css-loader?',
'modules&importLoaders=1&',
'localIdentName=[name]__[local]___[hash:base64:5]!',
'postcss-loader'
].join('')
}) })
}] }]
} }

View File

@ -11,7 +11,12 @@ module.exports = {
module: { module: {
loaders: [{ loaders: [{
test: /\.css?$/, test: /\.css?$/,
loader: 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader' loader: [
'css-loader?',
'modules&importLoaders=1&',
'localIdentName=[name]__[local]___[hash:base64:5]!',
'postcss-loader'
].join('')
}] }]
} }
}; };