fis3-postpackager-robot
Version:
73 lines (68 loc) • 1.85 kB
JavaScript
const path = require('path');
const jsRules = {
// 'comma-dangle': ['error', 'always'], //逗号尾随
//'semi': ['error', 'always'], //分号尾随
'indent': ['error', 4],
'space-before-function-paren': ['error', 'never'],
'no-useless-constructor': 'off',
'no-unused-vars': 'off',
'no-callback-literal': 0,
'no-unreachable': 0
};
const cssRules = {
'indentation': [1, {'size': 4}],
'property-sort-order': 0,
'no-misspelled-properties': 0,
'no-vendor-prefixes': 0,
'no-color-literals': 0,
'nesting-depth': 0,
'class-name-format': [1 , {
'convention': /^[A-Za-z][A-Za-z\d_]*$/
//'convention': 'snakecase'
}],
'empty-args': [1, {
include: true
}],
'no-url-protocols': 0,
'no-url-domains': 0,
'mixins-before-declarations': 0,
'extends-before-declarations': 0,
'no-important': 0,
'pseudo-element': 0
};
const flowRules = {};
module.exports = {
jsLinter: fis.plugin('noob-eslint', {
globals: [
"TWEEN",
"Swiper",
"Vue",
"$",
"fis",
"__inline",
"Context",
"homeAds"
],
parserOptions: {
"ecmaVersion": 6,
"sourceType": "module"
},
rules: jsRules
}),
jsxLinter: fis.plugin('noob-eslint', {
plugins: [,,'react'],
parserOptions: {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
rules: jsRules
}),
cssLinter: fis.plugin('sass', {
rules: cssRules,
configPath: path.join(__dirname, './sass-lint.yml')
}),
flowLinter: fis.plugin('flow')
};