Comments (4)
This is with the --verify
flag, unfortunately false positives can happen there. The main intention of the flag is for initial migrations to highlight "potential" problems when running over lots of files, let the user manually diff, and if it is all good then it should be fine to format.
from stylua.
Is there any way to solve this problem?
I tried rewriting the code but it didn't work.
from stylua.
You don't really need to use --verify in your day to day, it is for initial formatting of a lot of files. Stylua is pretty stable enough now to not produce invalid code, and even then it is easier to pick up and issues during day-to-day formatting
from stylua.
So, how can I format my Lua code according to my stylua.toml file using the Stylua's npm package?
Does Stylua has some command that formats my code automatically, or do I need to format my code by myself?
from stylua.
Related Issues (20)
- Panic when veryfing lua file
- label declaration after variable assignment/declaration gives `error parsing: error occurred while creating ast: unexpected token \`end\`` HOT 2
- Parsing error with leading & in a type HOT 1
- Improve formatting for Luau string interpolation
- Stylua prints the comment amid a return statement to stdout HOT 2
- Support luajit numeric literal suffixes HOT 1
- Improve formatting for table literals with long table types
- Comments right above an `else` or `elseif` clause should not be indented
- ignorelist ignored when providing name directly HOT 1
- Don't remove parenthesis in `Rest...` generics.
- Semicolon gets removed when using Luau's compound assignment operators, leading to ambiguous syntax
- [QUESTION] Neovim::conform default formatting options
- Stylua error: thread '<unknown>' has overflowed its stack
- Update wasm-bindgen and wasm-pack to resolve ReferenceError
- Formatting 0xffff_ffc0 (Hex number with _ spacer errors with --verify
- Formation with comment between colon and method - breaks AST
- When both lua5.2 and luau are enabled, stylua sometimes chokes on label declarations
- Error using flags when building copying using Docker
- Type union inside sealed table collapses comments
- Add .gitignore ignore cli flag/option
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 stylua.