I need to exclude css files from the eslint parser.
Currently when I run eslint src/**
this is checking all the files including css files. .
Please find below my eslintrc file contents.
module.exports = {
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"env" : {
"browser": true
}
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
},
};
.eslintignore
file to ignore styles would work nicely. maybe something like this:*.css
orsrc/**/*.css
. also, have you tried setting your eslint "root" to the folder of concern, that may simplify things? – Costumiersrc/**
as the path will miss any.jsx
files in subdirectories inside ofsrc
. You can useeslint --ext js,jsx src
instead and won't have to exclude CSS files in the eslintignore. – Wino