@atlaskit/eslint-plugin-design-system 13.21.2 → 13.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 13.21.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 13.21.2
4
10
 
5
11
  ### Patch Changes
@@ -1290,7 +1296,6 @@
1290
1296
  - [#86321](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86321)
1291
1297
  [`b353b26e22b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b353b26e22b6) -
1292
1298
  Improvements for `no-*-tagged-template-expression` rules:
1293
-
1294
1299
  - Fixed a bug that could produce syntax errors when mixins were present in nested selectors.
1295
1300
  - Disabled autofixing styled components usages with mixins in nested selectors, as there is no
1296
1301
  general equivalent.
@@ -1334,7 +1339,6 @@
1334
1339
  functions will no longer be required to end with "Styles".
1335
1340
 
1336
1341
  [BREAKING] Some rule options have been changed:
1337
-
1338
1342
  - `fixNamesOnly` and `autoFixNames` have been removed, as there is no longer an autofixer that
1339
1343
  enforces variable names.
1340
1344
  - If you use `fixNamesOnly: true`, we recommend switching to using `autoFix: false`.
@@ -1366,7 +1370,6 @@
1366
1370
  - [#80662](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80662)
1367
1371
  [`4833299b00d4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4833299b00d4) -
1368
1372
  For `no-css-tagged-template-expression` and `no-styled-tagged-template-expression`:
1369
-
1370
1373
  - When importing from Emotion, stop applying autofixer when the styles contain `!important`.
1371
1374
  - When importing from any library, stop applying autofixer when a selector contains a tagged
1372
1375
  template interpolation (previously only styled-components).
@@ -1551,7 +1554,6 @@
1551
1554
  [`ec187f466e23`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ec187f466e23) -
1552
1555
  Update `consistent-css-prop-usage` to incorporate some updates previously made to the
1553
1556
  `@compiled/eslint-plugin` equivalent.
1554
-
1555
1557
  1. Add autofixer to add the `css` function for the following scenario:
1556
1558
 
1557
1559
  ```
@@ -1563,25 +1565,20 @@
1563
1565
  `{ height: makeTaller ? '5px' : '2px' }`), or if there are spread elements, template literals, and
1564
1566
  other tricky-to-parse code. These continue to require fixing manually.
1565
1567
 
1566
- (This rule would previously only autofix if the file was originally `<div css={{ ... }} />`)
1567
-
1568
- 2. Add `import { css } from '@compiled/react'` (or `xcss`) automatically when fixing. The package
1569
- from which to import the `css` function can be specified through the `importSource` option.
1570
-
1571
- 3. Add `excludeReactComponents` to exclude linting React components (i.e. components that start
1572
- with uppercase). Sometimes it may not be desirable to have this rule apply to React components
1573
- (e.g. `@atlaskit/button`), which could either use the Emotion or Compiled APIs when they expose
1574
- a `css` prop. Passing a function from the wrong library can result in the styling erroneously
1575
- not being applied.
1576
-
1577
- 4. Treat `{ ... } as const` statements the same way as `{ ... }` objects.
1578
-
1579
- 5. Add `fixNamesOnly` to disable all autofixers _except_ the autofixer that adds `styles` to the
1580
- end of existing style variables. For example, in
1581
- `<div css={buttonComponent} />; const buttonComponent = css({ ... })`, `buttonComponent` will
1582
- continue to be renamed to `buttonComponentStyles`. Autofixers that will be _disabled_ include
1583
- hoisting the styles to the top-most scope, and adding the `css` function call around style
1584
- objects.
1568
+ (This rule would previously only autofix if the file was originally `<div css={{ ... }} />`) 2.
1569
+ Add `import { css } from '@compiled/react'` (or `xcss`) automatically when fixing. The package
1570
+ from which to import the `css` function can be specified through the `importSource` option. 3. Add
1571
+ `excludeReactComponents` to exclude linting React components (i.e. components that start with
1572
+ uppercase). Sometimes it may not be desirable to have this rule apply to React components (e.g.
1573
+ `@atlaskit/button`), which could either use the Emotion or Compiled APIs when they expose a `css`
1574
+ prop. Passing a function from the wrong library can result in the styling erroneously not being
1575
+ applied. 4. Treat `{ ... } as const` statements the same way as `{ ... }` objects. 5. Add
1576
+ `fixNamesOnly` to disable all autofixers _except_ the autofixer that adds `styles` to the end of
1577
+ existing style variables. For example, in
1578
+ `<div css={buttonComponent} />; const buttonComponent = css({ ... })`, `buttonComponent` will
1579
+ continue to be renamed to `buttonComponentStyles`. Autofixers that will be _disabled_ include
1580
+ hoisting the styles to the top-most scope, and adding the `css` function call around style
1581
+ objects.
1585
1582
 
1586
1583
  ## 8.26.0
1587
1584
 
@@ -1592,7 +1589,6 @@
1592
1589
  Add some ESLint rules from Compiled CSS-in-JS, and adapt them for the UI Styling Standard.
1593
1590
 
1594
1591
  Rules added:
1595
-
1596
1592
  - `no-empty-styled-expression`: ban `styled({})` usages
1597
1593
  - `no-exported-css` and `no-exported-keyframes`: ban `css` and `keyframes` function calls that are
1598
1594
  exported
@@ -1600,7 +1596,6 @@
1600
1596
  not valid
1601
1597
 
1602
1598
  Changes made:
1603
-
1604
1599
  - Add them to monorepo, modify to use the existing utility functions
1605
1600
  - Add support for CSS-in-JS libraries other than Compiled (styled-components, Emotion,
1606
1601
  `@atlaskit/css`, etc.) and `xcss` where appropriate
@@ -1831,7 +1826,6 @@
1831
1826
  [`0004d49c240`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0004d49c240) - Adds a
1832
1827
  new argument `fallbackUsage` which replaces `shouldEnforceFallbacks`. This new argument is an enum
1833
1828
  which represents the three possible states this rule can be configured with.
1834
-
1835
1829
  - `forced`: Fallbacks must always been in use
1836
1830
  - `none`: Fallbacks must never been in use. (Fixer will remove any value provided )
1837
1831
  - `optional`: (new) Fallbacks are optional
@@ -2181,7 +2175,6 @@
2181
2175
  This rule defaults to `error`.
2182
2176
 
2183
2177
  To update to this version:
2184
-
2185
2178
  - If you are using the `ensure-design-token-usage` rule, add the `domains` property with a value
2186
2179
  of `['color']`:
2187
2180
 
@@ -2382,14 +2375,12 @@
2382
2375
  - [#32576](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32576)
2383
2376
  [`b910bbe6130`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b910bbe6130) - The
2384
2377
  following rules are now included in the recommended preset as errors:
2385
-
2386
2378
  - ensure-design-token-usage
2387
2379
  - no-deprecated-apis
2388
2380
  - no-deprecated-imports
2389
2381
  - no-unsafe-design-token-usage
2390
2382
 
2391
2383
  The following rules are now included in the recommended preset as warnings:
2392
-
2393
2384
  - no-deprecated-design-token-usage
2394
2385
 
2395
2386
  ### Minor Changes
@@ -2886,7 +2877,6 @@
2886
2877
  as hardcoded color usage. This affected Styled Components and Emotion CSS prop syntaxes.
2887
2878
 
2888
2879
  These color types have been fixed:
2889
-
2890
2880
  - rgb
2891
2881
  - rgba
2892
2882
  - hsl
@@ -2986,7 +2976,6 @@
2986
2976
  This has now been split up into two separate rules:
2987
2977
 
2988
2978
  `ensure-design-token-usage` now covers:
2989
-
2990
2979
  - `legacyElevation` — warns about old usages of the elevation mixins or styles, which instead
2991
2980
  should use the `card` or `overlay` tokens.
2992
2981
  - `hardCodedColor` — warns about use of hard-coded colors such as `color: colors.B100`, which
@@ -2994,7 +2983,6 @@
2994
2983
  codebases when first adopting tokens.
2995
2984
 
2996
2985
  `no-unsafe-design-token-usage` (new) covers the remaining rules:
2997
-
2998
2986
  - `directTokenUsage` — warns against using the CSS Custom Property name that is output in the
2999
2987
  browser by the `token()` call. Eg. directly using `var(--ds-accent-subtleBlue)` is bad.
3000
2988
  - `staticToken` — warns when tokens aren't used inline. Inlining the token usages helps with
@@ -3054,20 +3042,17 @@
3054
3042
  - [#14319](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/14319)
3055
3043
  [`b6a55ffa092`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b6a55ffa092) -
3056
3044
  Introduces fixes for various edge-cases and false positives:
3057
-
3058
3045
  - Objects that are not considered "style blocks" are now ignored. Style blocks are considered as
3059
3046
  objects assigned to variables with names containing either "style", "css", or "theme" and type
3060
3047
  annotations including "CSSProperties" or "CSSObject".
3061
3048
  - Hexadecimal colors using the `0x` notation are now ignored
3062
3049
 
3063
3050
  Increasing the linting surface-area:
3064
-
3065
3051
  - Colors used in shorthand css property values will now be linted against. (ie
3066
3052
  `border: solid 1px red`)
3067
3053
  - Strings passed directly into JSX attributes (props) are now linted (ie `<Button color="red" />`)
3068
3054
 
3069
3055
  General improvements:
3070
-
3071
3056
  - Color names will now only match against "whole" words. Meaning strings that inadvertently
3072
3057
  include color names like the "tan" in "standard" will no longer fail.
3073
3058
 
@@ -3144,11 +3129,9 @@
3144
3129
  removes & renames tokens
3145
3130
 
3146
3131
  Adds:
3147
-
3148
3132
  - `color.backgroundSelect`
3149
3133
 
3150
3134
  Renames:
3151
-
3152
3135
  - `color.borderTextHighlighted` to `color.bordertextSelected`
3153
3136
  - `elevation.base` to `evelation.backgroundDefault`
3154
3137
  - `elevation.flatSecondary` to `elevation.backgroundSunken`
@@ -3159,11 +3142,9 @@
3159
3142
  - `elevation.shadowOverlay` to `shadow.overlay`
3160
3143
 
3161
3144
  Removes:
3162
-
3163
3145
  - `elevation.boarderFlatPrimary`
3164
3146
 
3165
3147
  Updates:
3166
-
3167
3148
  - `elevation.shadowOverlay` value to `DN100`
3168
3149
  - `color.textWarning` in light mode to `O800`
3169
3150
  - `color.iconBorderWarning` in light mode to `O600`
@@ -20,7 +20,7 @@ var _index = require("./rules/index.codegen");
20
20
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
21
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
22
22
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
23
- * @codegen <<SignedSource::891a7e1d667de46cfe89cad670005f2c>>
23
+ * @codegen <<SignedSource::095a43b3637f01bf6b70a07041528ef7>>
24
24
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
25
25
  */
26
26
  // this uses require because not all node versions this package supports use the same import assertions/attributes
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::891a7e1d667de46cfe89cad670005f2c>>
3
+ * @codegen <<SignedSource::095a43b3637f01bf6b70a07041528ef7>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
 
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  /**
5
5
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
6
- * @codegen <<SignedSource::891a7e1d667de46cfe89cad670005f2c>>
6
+ * @codegen <<SignedSource::095a43b3637f01bf6b70a07041528ef7>>
7
7
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
8
8
  */
9
9
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::891a7e1d667de46cfe89cad670005f2c>>
3
+ * @codegen <<SignedSource::095a43b3637f01bf6b70a07041528ef7>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  import type { ESLint } from 'eslint';
@@ -10,6 +10,6 @@ declare const meta: {
10
10
  version: string;
11
11
  };
12
12
  export declare const plugin: ESLint.Plugin;
13
- declare const configs: Record<string, import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | ESLint.ConfigData<import("eslint").Linter.RulesRecord> | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord>[]> | undefined;
13
+ declare const configs: ESLint.Plugin['configs'];
14
14
  export { configs, meta, rules };
15
15
  export default plugin;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::891a7e1d667de46cfe89cad670005f2c>>
3
+ * @codegen <<SignedSource::095a43b3637f01bf6b70a07041528ef7>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  import type { ESLint } from 'eslint';
@@ -10,6 +10,6 @@ declare const meta: {
10
10
  version: string;
11
11
  };
12
12
  export declare const plugin: ESLint.Plugin;
13
- declare const configs: Record<string, import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | ESLint.ConfigData<import("eslint").Linter.RulesRecord> | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord>[]> | undefined;
13
+ declare const configs: ESLint.Plugin['configs'];
14
14
  export { configs, meta, rules };
15
15
  export default plugin;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
3
  "description": "The essential plugin for use with the Atlassian Design System.",
4
- "version": "13.21.2",
4
+ "version": "13.21.3",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@atlaskit/eslint-utils": "^2.0.0",
42
- "@atlaskit/icon": "^28.3.0",
43
- "@atlaskit/icon-lab": "^5.8.0",
44
- "@atlaskit/tokens": "^6.4.0",
42
+ "@atlaskit/icon": "^28.5.0",
43
+ "@atlaskit/icon-lab": "^5.10.0",
44
+ "@atlaskit/tokens": "^7.0.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@typescript-eslint/utils": "^7.1.0",
47
47
  "ajv": "^6.12.6",