Comments (15)
So am I right in thinking that, with the addition of result.messages
to postcss, stylelint will be a collection of linter postcss plugins, just like cssnext is a collection of transpiler postcss plugins (with added caniuse support)?
And, just like cssnext, you'll be able to pass in a big options parameter. In stylelint's case, configuration options for the rules e.g:
var output = stylelint(input, {
rules: {
indentation: {
default: 1,
char: "\t",
},
eof-newline: true
}
})
And, with the addition of result.messages
to postcss, stylelint will be able to capture all the messages from the separate linter plugins and display them in a nice way?
If so, that all sounds fantastic to me! :)
from stylelint.
You are right 😉
from stylelint.
Awesome :)
from stylelint.
Sounds great to me. Good thinking.
from stylelint.
I was thinking about writing some linter modules sometime soonish, and just wanted to ensure that they would be compatible with stylelint once stylelint gets going. So I have one question for @MoOx about the intentions of stylelint: If I write linting modules that register their complaints via the PostCSS 4.1+ warnings API, will that be enough for stylelint to understand and interpret them? Is the plan to build stylelint right on top of that API?
from stylelint.
FYI this messages API in postcss exists because I gave the idea for stylelint. So yes I would definitly use it :)
I don't plan to make hundreds of postcss-* plugins for this linter and would prefer to get the rules in a single repo.
I really like ESLint so I think I will try to mimic the way you can use it. So we should definitly support "stylelint plugin" (-> postcss plugin).
For a quick start I plan to work on stylelint as a postcss plugin. I will try to work on this really soon.
from stylelint.
👍
from stylelint.
Is it currently fonctionnal? If i read your source code i don't read anything about CSS. Just JS right?
from stylelint.
Nothing has been made yet.
from stylelint.
Until there is some other structure in place, what would you think of the following temporary setup:
- Write and test rules individually, as though they were individual plugins although they live here in the same repo; basically, they are functions that accept the AST and result objects and register warnings on the result.
- The plugin itself accepts a single options object containing settings for all rules.
- Rules register problems as warnings. These could then be printed in the console by the runner or with something like postcss-log-warnings.
?? Would that work as a temporary setup?
I might have some time to write some rules soon -- e.g. at laundromat tonight :) -- so I wanted to see if there was an acceptable way to get something usable going. I can implement this if you agree with it.
from stylelint.
That would totally works for me.
Sorry to started something and to not do anything... I am really busy with cssnext these days...
So I added you as a collaborator ;)
from stylelint.
Ok. I understand that it's OSS and you do not have unlimited time, so definitely wasn't trying to pressure you :) Just wanted a starting point, and this would work. Cool! Hope I can write a few soon.
from stylelint.
Would that work as a temporary setup?
Sounds good to me!
from stylelint.
I think we can close this one for now. Don't you think ?
from stylelint.
Yes.
from stylelint.
Related Issues (20)
- Release 16.4.0 HOT 6
- Consider adding meta.schema HOT 7
- Fix `declaration-block-no-redundant-longhand-properties` autofix for `border` HOT 2
- Fix `declaration-block-no-redundant-longhand-properties` autofix conflicts HOT 1
- Add support for defining default value via environment variable HOT 5
- `function-calc-no-unspaced-operator` should support newer calc functions HOT 2
- Fix `declaration-block-no-redundant-longhand-properties` autofix for `font-variant`
- Add `formatter` property in configuration
- Fix `function-no-unknown` false positive for `palette-mix` HOT 4
- Fix `value-no-vendor-prefix` false negatives HOT 14
- If you manually specify the configPath path in VScode's stylelint extension, the.stylelintignore file will no longer be recognized, not even the array in the ignoreFiles property of the configuration object
- `declaration-block-no-redundant-longhand-properties` is not forwards compatible HOT 13
- `declaration-block-no-redundant-longhand-properties` needs to be value type aware HOT 8
- Add new rule to disallow specific condition in `@container` queries HOT 1
- Create option to extend rule: font-family-no-duplicate-names HOT 1
- Create option to extend rule: no-duplicate-at-import-rules HOT 1
- Create option to extend rule: no-unknown-animations HOT 1
- CLI doesn't seem to work as expected. HOT 2
- [16.4.0] Cannot suppress `selector-max-universal` HOT 4
- Add regex support to `value-no-vendor-prefix` secondary 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 stylelint.