Skip to content

How to make it work for me? #54

@ThoughtZer

Description

@ThoughtZer
const stylelint = require('stylelint');

const code = `
  import { StyleSheet } from 'react-native';

  StyleSheet.create({
    foo: {
      COLR: 'red'
    }
  })
`;

const options = {
  config: {
    rules: {
      'react-native/style-property-no-unknown': true,
    },
    plugins: ['stylelint-react-native'],
  },
  code,
  syntax: 'css-in-js',
};

stylelint.lint(options).then((output) => {
  console.log(output.results[0].warnings); // []
});

Did i do something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions