Reputation: 55
I'm having trouble getting my eslint atom package to work with jsx. My eslint package references a global .eslintrc in my home directory. Following the eslint docs I have my .eslintrc file set up as follows:
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
"semi": 2,
"strict": 0
}
}
My package.json dependencies:
"devDependencies": {
"babel-core": "^6.2.1",
"babel-eslint": "^8.2.6",
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.1.18",
"babel-preset-react": "^6.1.18",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.10.0",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0"
},
"dependencies": {
"babel-preset-stage-1": "^6.1.18",
"lodash": "^3.10.1",
"react": "16.3.2",
"react-dom": "16.3.2",
"react-redux": "5.0.7",
"redux": "4.0.0",
"youtube-api-search": "0.0.5"
}
I have installed the babel parser and eslint-plugin-react but am still not able to read the jsx. I'd really appreciate any help with this, thanks in advance.
Upvotes: 0
Views: 368
Reputation: 27
What you mean by saying cant read jsx? If i get you right, i assume Atom is not showing any Error? If so, it would be great to show us the list of installed Atom packages. I guess you missed to include some packages e.g language-javascript-jsx
Upvotes: 0