Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First propal #1

Merged
merged 1 commit into from
Jul 21, 2015
Merged

First propal #1

merged 1 commit into from
Jul 21, 2015

Conversation

magsout
Copy link
Member

@magsout magsout commented Jul 16, 2015

I analyzed all the codebase cssrecipes and makes a config stylelint.

Here you can see what happens after normalizing the code https://gist.github.com/magsout/b17b5c29c3911056a6b1/revisions

What do you think guys ? poke @MoOx @bloodyowl

It still lacks the stylelint/stylelint#278 indentation part and multiple part selector stylelint/stylelint#285

var input = fs.readFileSync("index.css", "utf8")

var output = postcss()
.use(cssnext())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If cssrecipes is just using cssnext then I think stylelint can come first in the processor pipeline, as all the syntax in the cssnext is supported by stylelint. This will allow you to turn on rules like *-no-vendor-prefixes-* and make use of things like selector-root-no-composition

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, but in fact I want to use cssnext only like:

var fs = require("fs")

var cssnext = require("cssnext")
var cssrecipesConfig = require("stylelint-config-cssrecipes")

var input = fs.readFileSync("index.css", "utf8")

var output = cssnext(input, {
  import: {
    plugins:[
      require("stylelint")(cssrecipesConfig),
      require("postcss-reporter")
    ]
  }
})

But i need to talk with @MoOx why it doesn't work right now. This example is temporary

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be

cssnext(input, {
  beforeTransformPlugins: [
    require("stylelint")(cssrecipesConfig)
  ]
})

soon... MoOx/postcss-cssnext#149

@jeddy3
Copy link
Contributor

jeddy3 commented Jul 17, 2015

Looking great! It's awesome to see a comprehensive config come together.

I've added a few notes to the code.

trim_trailing_whitespace = false

[Makefile]
indent_style = tab
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makefile is kind of useless (also: npm script is fine most of the time ^^)

@MoOx
Copy link
Member

MoOx commented Jul 17, 2015

Looks good for a start :)

@magsout magsout force-pushed the first-propal branch 2 times, most recently from ca67f4a to ab7ab84 Compare July 18, 2015 19:19
@MoOx
Copy link
Member

MoOx commented Jul 21, 2015

lgtm right now

MoOx added a commit that referenced this pull request Jul 21, 2015
@MoOx MoOx merged commit f3c2053 into master Jul 21, 2015
@MoOx MoOx deleted the first-propal branch July 21, 2015 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants