Skip to content

Latest commit

 

History

History
348 lines (185 loc) · 21.4 KB

CHANGELOG.md

File metadata and controls

348 lines (185 loc) · 21.4 KB

eslint-plugin-primer-react

6.1.6

Patch Changes

  • #255 fd2cb55 Thanks @joshblack! - Update no-wildcard-imports rule to no longer migrate the TokenSizeKeys import

6.1.5

Patch Changes

  • #253 456bf4d Thanks @joshblack! - Update no-wildcard-imports rule to move ButtonBase to @primer/react/experimental

6.1.4

Patch Changes

  • #249 f8c8a9d Thanks @joshblack! - Update no-wildcard-imports rule to not create separate imports for type only imports. This prevents an issue downstream with autofixers

6.1.3

Patch Changes

  • #242 e139c02 Thanks @joshblack! - Update no-wildcard-imports rule to work for imports that specify value and type imports

6.1.2

Patch Changes

6.1.1

Patch Changes

6.1.0

Minor Changes

  • #225 b4698df Thanks @joshblack! - Add eslint rule for discouraging use of wildcard imports from @primer/react

6.0.2

Patch Changes

  • #218 e55d3d3 Thanks @iansan5653! - Fix incorrect rule violations on components imported from @primer/react-brand

6.0.1

Patch Changes

6.0.0

Major Changes

  • #207 baff792 Thanks @iansan5653! - [Breaking] Adds no-unnecessary-components lint rule and enables it by default. This may raise new (typically autofixable) lint errors in existing codebases.

  • #211 3f92cd4 Thanks @camchenry! - [Breaking] Adds prefer-action-list-item-onselect lint rule and enables it by default. This may raise new auto-fixable lint errors or type-checking errors in existing codebases.

Minor Changes

Patch Changes

5.4.0

Minor Changes

  • #103 8617a66 Thanks @broccolinisoup! - Add a11y-use-next-tooltip rule that warns against using Tooltip v1 (Not the accessible one)

Patch Changes

5.3.0

Minor Changes

5.2.1

Patch Changes

5.2.0

Minor Changes

Patch Changes

  • #183 7bd36d2 Thanks @khiga8! - New rule to flag Link in text block missing the inline prop

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