Comments (12)
I am not using sublime, but I will take a look at atom. Previously it worked in atom, then I switched to use VScode.
from eslint-plugin-riot.
Just had a test, it works in my atom with some tuning.
I personally use .html as file extension for my riot tag files. Then in atom linter-eslint config, check the Lint HTML Files
.
It will work as expected.
from eslint-plugin-riot.
For sublime, I think it is due to same reason: the editor plugin should lint the tag files. By default they lint *.js and *.es6, but not *.tag or *.html.
Close this issue.
from eslint-plugin-riot.
Changed the filename to '.html'. Looks like linting is working but now getting the following error:
Error: ESLint crashed: Cannot read property 'length' of null
from eslint-plugin-riot.
from eslint-plugin-riot.
@jonsaw could you please share your package.json? I'd like to see the eslint package versions.
from eslint-plugin-riot.
package.json
{
"name": "demo",
"version": "0.0.1",
"scripts": {
"build": "webpack --config webpack.config.js"
},
"dependencies": {
"riot": "^2.3.15"
},
"devDependencies": {
"babel-core": "^6.5.2",
"babel-eslint": "^5.0.0",
"babel-loader": "^6.2.3",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.5.0",
"eslint": "^2.2.0",
"eslint-config-airbnb": "^6.0.1",
"eslint-plugin-react": "^4.0.0",
"eslint-plugin-riot": "^0.1.4",
"file-loader": "^0.8.5",
"riotjs-loader": "^1.2.0",
"webpack": "^1.12.13"
}
}
from eslint-plugin-riot.
ok. It might be due to eslint v2. I will upgrade my project and verify. Thanks for the information.
from eslint-plugin-riot.
@jonsaw I just did a test with atom + latest eslint-atom plugin + latest eslint. It works well on my machine.
Code is here: https://github.com/txchen/feplay/tree/gh-pages/riot_webpack
I suggest you to call eslint in CLI to see the result, if it works well, but not in the editor, I'd say it is editor plugin's issue. I don't use sublime text, so cannot help to test it.
from eslint-plugin-riot.
As you can see, I have a npm script in my package.json:
"lint": "eslint --ext .js,.es6,.html src/*"
I run npm run lint
, and I can confirm that eslint-plugin-riot works well.
from eslint-plugin-riot.
How to add the support of .tag
file on atom and sublimeText ?
from eslint-plugin-riot.
@throrin19 that is limited by the editor plugin, not this plugin. If editor plugin don't call eslint on .tag file, there is no way to do that.
from eslint-plugin-riot.
Related Issues (11)
- Need to fix the parsing logic, about the code block HOT 1
- Error/Warning indicators (dots) not displaying in next to line numbers in Sublime Text 2 HOT 1
- Support autofix HOT 1
- Support for riot 4
- Support linting HTML expressions, not just <script> tags
- Was the latest commit pushed to the NPM registry?
- ES5 support HOT 7
- Support plain <script> tags? HOT 2
- Riot ES6 syntax produces parsing error HOT 6
- Is it possible to add eslint even when type is empty? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-riot.