GithubHelp home page GithubHelp logo

kristerkari / stylelint-config-react-native-css-modules Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 3.01 MB

Shareable stylelint config for React Native CSS modules

License: MIT License

JavaScript 100.00%
stylelint react-native css-modules linter-config

stylelint-config-react-native-css-modules's Introduction

stylelint-config-react-native-css-modules

NPM version Build Status Downloads per month contributions welcome

Shareable stylelint config for React Native CSS modules

Installation and usage

Install stylelint-config-react-native-css-modules (and stylelint + stylelint-react-native, if you haven't done so yet):

yarn add stylelint stylelint-react-native stylelint-config-react-native-css-modules --dev

or

npm install stylelint stylelint-react-native stylelint-config-react-native-css-modules --save-dev

Create the .stylelintrc config file (or open the existing one) and extend stylelint-config-react-native-css-modules config.

{
  "extends": "stylelint-config-react-native-css-modules",
  "rules": {
    "selector-class-pattern": "^[a-z][a-zA-Z0-9]*$"
  }
}

Config for React Native + Web

By default the config is for React Native only, but if you want to share the styles between React Native and Web, extend the stylelint-config-react-native-css-modules/web config instead. This turns some of the errors to warnings to ensure compatibility with Web.

{
  "extends": "stylelint-config-react-native-css-modules/web",
  "rules": {
    "selector-class-pattern": "^[a-z][a-zA-Z0-9]*$"
  }
}

If you want to turn off any of the included errors or warnings, set the rule's value to null:

{
  "extends": "stylelint-config-react-native-css-modules/web",
  "rules": {
    "react-native/font-weight-no-ignored-values": null
  }
}

stylelint-config-react-native-css-modules's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar kristerkari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stylelint-config-react-native-css-modules's Issues

An in-range update of stylelint is breaking the build 🚨

The devDependency stylelint was updated from 9.5.0 to 9.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

stylelint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch: AppVeyor build failed (Details).
  • βœ… continuous-integration/travis-ci/push: The Travis CI build passed (Details).

Release Notes for 9.6.0
  • Added: suggestions for invalid CLI options (#3622).
  • Added: no-empty-first-line rule (#3650).
  • Added: at-rule-name-space-after autofix (#3653).
  • Added: block-closing-brace-empty-line-before autofix (#3598).
  • Added: block-closing-brace-space-before autofix (#3673).
  • Added: comment-whitespace-inside autofix (#3619).
  • Added: declaration-bang-space-after autofix (#3598).
  • Added: declaration-bang-space-before autofix (#3592).
  • Added: declaration-colon-newline-after autofix (#3588).
  • Added: function-comma-space-after autofix (#3555).
  • Added: function-comma-space-before autofix (#3596).
  • Added: function-name-case autofix (#3674).
  • Added: function-max-empty-lines autofix (#3645).
  • Added: function-parentheses-newline-inside autofix (#3601).
  • Added: function-whitespace-after autofix (#3648).
  • Added: media-feature-colon-space-after autofix (#3623).
  • Added: media-feature-colon-space-before autofix (#3637).
  • Added: media-feature-name-case autofix (#3685).
  • Added: media-feature-range-operator-space-after autofix (#3639).
  • Added: media-feature-range-operator-space-before autofix (#3618).
  • Added: media-query-list-comma-newline-after autofix (#3643).
  • Added: media-query-list-comma-space-after autofix (#3607).
  • Added: media-query-list-comma-space-before autofix (#3640).
  • Added: function-parentheses-space-inside autofix (#3563).
  • Added: selector-attribute-brackets-space-inside autofix (#3605).
  • Added: selector-attribute-operator-space-after autofix (#3641).
  • Added: selector-attribute-operator-space-before autofix (#3603).
  • Added: selector-pseudo-class-case autofix (#3671).
  • Added: selector-pseudo-class-parentheses-space-inside autofix (#3646).
  • Added: selector-type-case autofix (#3668).
  • Added: no-eol-whitespace autofix (#3615).
  • Added: no-extra-semicolons autofix (#3574).
  • Added: value-list-comma-newline-after autofix (#3616).
  • Added: value-list-comma-space-after autofix (#3558).
  • Added: value-list-comma-space-before autofix (#3597).
  • Added: baseIndentLevel to indentation (#3557).
  • Fixed: autofix for 5 whitespace rules (#3621).
  • Fixed: linebreaks TypeError (#3636).
  • Fixed: max-empty-lines incorrect line reporting (#3530).
  • Fixed: media-query-list-comma-newline-after false positives for trailing comment (#3657).
  • Fixed: no-descending-specificity false positives for CSS Modules functional pseudo-classes (#3623).
Commits

The new version differs by 99 commits.

  • d285c8f Prepare 9.6.0
  • 66b8f09 Update plugins.md (#3692)
  • 5a4fcbe Add codacy as an analysis platform engine (#3691)
  • d02b907 fix(package): update known-css-properties to version 0.8.0 (#3684)
  • b25d33d Update CHANGELOG.md
  • 16d49c0 Document mixin parameter note (#3688)
  • acd8898 Fix ESLint Jest warnings (#3689)
  • 3e22b9f Update CHANGELOG.md
  • 8642003 Update CHANGELOG.md
  • 7a18014 Add no-empty-first-line rule (#3650)
  • 8dadc25 feat: add autofix to media-feature-name-case (#3685)
  • 31c73b4 Update CHANGELOG.md
  • fbe3429 Add auto fix for selector-pseudo-class-case rule (#3671)
  • fefb34b Update CHANGELOG.md
  • 55a004e feat: add autofix for rule "selector-type-case" (#3668)

There are 99 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of stylelint-react-native is breaking the build 🚨

The devDependency stylelint-react-native was updated from 2.0.0 to 2.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

stylelint-react-native is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… continuous-integration/travis-ci/push: The Travis CI build passed (Details).
  • ❌ continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 10 commits.

  • 258ba07 Prepare version 2.0.1
  • 5b428b6 update lockfiles
  • bbf29f6 Merge pull request #15 from kristerkari/greenkeeper/eslint-config-stylelint-11.0.0
  • 9bbdb10 Merge pull request #16 from kristerkari/bugfix/css-property-no-unknown-support-export-block
  • 04c9451 fix a comment
  • 3d01abe Add changelog entry
  • b292aa6 Don't warn for unknown properties inside an :export pseudo-selector
  • c7359df chore(package): update eslint-config-stylelint to version 11.0.0
  • 9fc4505 Merge pull request #14 from kristerkari/feature/deps
  • 0aec6d0 Update deps

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.