Skip to content

Latest commit

 

History

History
242 lines (132 loc) · 14.4 KB

CHANGELOG.md

File metadata and controls

242 lines (132 loc) · 14.4 KB

eslint-plugin-primer-react

5.1.0

Minor Changes

5.0.0

Major Changes

4.2.0

Minor Changes

Patch Changes

4.1.2

Patch Changes

4.1.1

Patch Changes

4.1.0

Minor Changes

  • #129 eb04624 Thanks @joshblack! - Add no-deprecated-entrypoints rule to lint against deprecated import usage in @primer/react

Patch Changes

4.0.4

Patch Changes

  • #122 3bc226a Thanks @lukasoppermann! - New rule: new-color-css-vars-have-fallback: checks that if a new color var is used, it has a fallback value

4.0.3

Patch Changes

  • #81 821ef4d Thanks @langermank! - New rule: new-color-css-vars to find/replace legacy CSS color vars in sx prop

4.0.2

Patch Changes

  • #76 1750256 Thanks @joshblack! - Update the no-system-props rule to exclude the border prop for the Blankslate component from @primer/react.

4.0.1

Patch Changes

  • #74 c07df5c Thanks @TylerJDev! - Adds support for MarkdownEditor.Footer in direct-slot-children rule

4.0.0

Major Changes

Minor Changes

  • #67 4dfdb47 Thanks @TylerJDev! - * Updates component mapping, adds components.js
    • Bumps eslint-plugin-github and eslint-plugin-jsx-a11y
    • Fixes bug in a11y-explicit-heading when using spread props, or variable for as

Patch Changes

  • #73 974d9e8 Thanks @TylerJDev! - * Fixes nonInteractiveLink rule for links that pass values through JSX rather than a string
    • Adds optional chaining to getJSXOpeningElementAttribute to avoid error when no name is present

3.0.0

Major Changes

  • #49 ad22b85 Thanks @colebemis! - direct-slot-children: Add checks for MarkdownEditor slot children

2.0.3

Patch Changes

  • #47 9964e4e Thanks @colebemis! - - Update the no-system-props rule to properly check subcomponents for system props
    • Adds valid sucomponent props to the allowlist

2.0.2

Patch Changes

  • #45 a39e34d Thanks @colebemis! - More direct-slot-children fixes:
    • Fix bug related self-closing JSX tags
    • Allow slot children to accept multiple parents (ex: ActionList.Item or ActionList.LinkItem)
    • Add SplitPageLayout and NavList to the slot map
    • Ignore MarkdownEditor because it's still a draft

2.0.1

Patch Changes

2.0.0

Major Changes

Minor Changes

1.0.1

Patch Changes

1.0.0

Major Changes

  • #34 efd4f67 Thanks @khiga8! - Provide component mapping for github/react preset and add dependencies to eslint-plugin-github and eslint-plugin-jsx-a11y.

    eslint peer dependency is now ^8.0.1.

0.7.4

Patch Changes

0.7.3

Patch Changes

0.7.2

Patch Changes

0.7.1

Patch Changes

  • #22 87d0fd6 Thanks @dmarcey! - Ignore non-literal, non-string arguments to themeGet in no-deprecated-colors rule

0.7.0

Minor Changes

  • #18 f0c7a3d Thanks @jfuchs! - Introduced an option on no-system-props to include utility components (includeUtilityComponents).
  • #20 b0824f6 Thanks @jfuchs! - Updates no-system-props rule to always exclude the 'variant' prop no matter which component.

0.6.1

Patch Changes

  • #15 9b96147 Thanks @colebemis! - The no-deprecated-colors now warns about deprecated and removed color variables

0.6.0

Minor Changes

0.5.0

Minor Changes

  • #10 31d069b Thanks @colebemis! - Add a checkAllStrings option to the no-deprecated-colors rule.

    If checkAllStrings is set to true, the no-deprecated-colors rule will check for deprecated colors in all strings. This is useful for catching uses of deprecated colors outside system props and the sx prop.

    /* eslint primer-react/no-deprecated-colors: ["warn", {"checkAllStrings": true}] */
    import {Box} from '@primer/react'
    
    function ExampleComponent() {
      const styles = {
        // Enabling `checkAllStrings` will find deprecated colors used like this:
        color: 'text.primary',
      }
      return <Box sx={styles}>Hello</Box>
    }

0.4.2

Patch Changes

  • #7 d9dfb8d Thanks @colebemis! - Add skipImportCheck option. By default, the no-deprecated-colors rule will only check for deprecated colors used in functions and components that are imported from @primer/react. You can disable this behavior by setting skipImportCheck to true. This is useful for linting custom components that pass color-related props down to Primer React components.
  • #6 dd14594 Thanks @colebemis! - The no-deprecated-colors rule can now find deprecated colors in the following cases:

    • Nested sx properties:

      <Box sx={{'&:hover': {bg: 'bg.primary'}}}>
    • Functions in sx prop:

      <Box sx={{boxShadow: theme => `0 1px 2px ${theme.colors.text.primary}`}}>

0.4.1

Patch Changes