Skip to content

Commit

Permalink
refactor: Add parserOptions item and change env node to browser
Browse files Browse the repository at this point in the history
  • Loading branch information
tyankatsu0105 committed May 11, 2019
1 parent 4c92d20 commit 61b5eb6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,23 @@ $ yarn add eslint eslint-plugin-gridsome vue-eslint-parser -D
// this sample is .eslintrc.js

module.exports = {
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
env: {
node: true,
browser: true,
es6: true
},
plugins: ["gridsome"],
rules: {
"gridsome/format-query-block": "error"
...
},
parser: "vue-eslint-parser"
};
```

Expand Down
14 changes: 9 additions & 5 deletions lib/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

module.exports = {
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
env: {
es6: true,
node: true
browser: true,
es6: true
},
plugins: ["gridsome"],
rules: {
"gridsome/format-query-block": "warn",
"gridsome/require-g-image-src": "error",
"gridsome/require-g-link-to": "warn"
},
"parserOptions": {
"sourceType": "module"
}
};
11 changes: 9 additions & 2 deletions tools/update-readme/_readme/readme-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,23 @@ $ yarn add eslint eslint-plugin-gridsome vue-eslint-parser -D
// this sample is .eslintrc.js

module.exports = {
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
env: {
node: true,
browser: true,
es6: true
},
plugins: ["gridsome"],
rules: {
"gridsome/format-query-block": "error"
...
},
parser: "vue-eslint-parser"
};
```

Expand Down

0 comments on commit 61b5eb6

Please sign in to comment.