Skip to content

Commit

Permalink
docs: how to ignore svgs for eslint (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
André Van Dal authored and TheAlexLichter committed Jan 30, 2019
1 parent e7ebe3f commit d66216f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,27 @@ export default {
}
```

## How to fix Eslint auto lint error
If you turn on Eslint on save by server, you should exclude `.svg` files of `eslint-loader`.

Example:
```js
// nuxt.config.js
build: {
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)||(.svg$)/ /* <--- here */
})
}
}
}
```

## Development

- Clone this repository
Expand Down

0 comments on commit d66216f

Please sign in to comment.