🌈 style(eslint): 新增eslint规则
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"development"',
|
||||
|
||||
+8
-7
@@ -1,15 +1,16 @@
|
||||
const path = require('path')
|
||||
const childProcess = require('child_process')
|
||||
const versions =
|
||||
childProcess.execSync('git rev-parse --abbrev-ref HEAD', {
|
||||
|
||||
const versions
|
||||
= childProcess.execSync('git rev-parse --abbrev-ref HEAD', {
|
||||
encoding: 'utf8',
|
||||
}) != 'HEAD\n'
|
||||
? childProcess.execSync('git rev-parse --abbrev-ref HEAD', {
|
||||
encoding: 'utf8',
|
||||
})
|
||||
encoding: 'utf8',
|
||||
})
|
||||
: childProcess.execSync('git describe --tags --abbrev=0', {
|
||||
encoding: 'utf8',
|
||||
})
|
||||
encoding: 'utf8',
|
||||
})
|
||||
const CURRENT_GITHASH = childProcess.execSync('git rev-parse --short HEAD', {
|
||||
encoding: 'utf8',
|
||||
})
|
||||
@@ -109,7 +110,7 @@ const config = {
|
||||
// },
|
||||
}
|
||||
|
||||
module.exports = function (merge) {
|
||||
module.exports = function(merge) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return merge({}, config, require('./dev'))
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"pre"',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"production"',
|
||||
|
||||
Reference in New Issue
Block a user