Skip to content

Commit

Permalink
add parserOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjunxiao committed Jan 19, 2018
1 parent 7f81be2 commit c4e9849
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Expand Up @@ -3,7 +3,7 @@ env:
node: true
mocha: true
rules:
# strict: [error, global]
# strict: [error, global]
indent: [error, 2, {SwitchCase: 1}]
linebreak-style: [error, unix]
comma-dangle: [error, only-multiline]
Expand Down
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -127,6 +127,7 @@ module.exports = function(sails) {
'!app.js',
'!api/responses/**/*.js'
],
parserOptions: {},
reportError: console.error,
reportWarn: console.warn
}
Expand Down Expand Up @@ -171,7 +172,8 @@ module.exports = function(sails) {
_status = runLint(patterns, config.format, config.reportError, config.reportWarn, {
globals: globals,
ignorePattern: ignorePattern,
configFile: configFile
configFile: configFile,
parserOptions: config.parserOptions
});
sails.log.info('ESLint finished.');
return cb();
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "sails-hook-lint",
"version": "1.1.1",
"version": "1.1.2",
"description": "Sails hook for code style check",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit c4e9849

Please sign in to comment.