Skip to content

Commit d66216f

Browse files
André Van DalTheAlexLichter
André Van Dal
authored andcommitted
docs: how to ignore svgs for eslint (#34)
1 parent e7ebe3f commit d66216f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,27 @@ export default {
114114
}
115115
```
116116

117+
## How to fix Eslint auto lint error
118+
If you turn on Eslint on save by server, you should exclude `.svg` files of `eslint-loader`.
119+
120+
Example:
121+
```js
122+
// nuxt.config.js
123+
build: {
124+
extend(config, ctx) {
125+
// Run ESLint on save
126+
if (ctx.isDev && ctx.isClient) {
127+
config.module.rules.push({
128+
enforce: 'pre',
129+
test: /\.(js|vue)$/,
130+
loader: 'eslint-loader',
131+
exclude: /(node_modules)||(.svg$)/ /* <--- here */
132+
})
133+
}
134+
}
135+
}
136+
```
137+
117138
## Development
118139

119140
- Clone this repository

0 commit comments

Comments
 (0)