@atlaskit/eslint-plugin-ui-styling-standard 0.17.0 → 0.18.0

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,13 @@
1
1
  # @atlaskit/eslint-plugin-ui-styling-standard
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#117005](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117005)
8
+ [`af9ff1e4ec472`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/af9ff1e4ec472) -
9
+ The recommended config now has `consistent-css-prop-usage` linting enabled for the `xcss` prop.
10
+
3
11
  ## 0.17.0
4
12
 
5
13
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../../tsconfig.products.json",
2
+ "extends": "../../../../tsconfig.entry-points.jira.json",
3
3
  "compilerOptions": {
4
4
  "target": "es5",
5
5
  "lib": [
@@ -7,8 +7,7 @@
7
7
  ],
8
8
  "outDir": "../../../../../tsDist/@atlaskit__eslint-plugin-ui-styling-standard/app",
9
9
  "composite": true,
10
- "rootDir": "../",
11
- "baseUrl": "../"
10
+ "rootDir": "../"
12
11
  },
13
12
  "include": [
14
13
  "../src/**/*.ts",
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  /**
8
8
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
- * @codegen <<SignedSource::aa1d9d67dc9b6b0488df0b31ff142f30>>
9
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -30,7 +30,8 @@ var _default = exports.default = {
30
30
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
31
31
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
32
32
  '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
33
- excludeReactComponents: true
33
+ excludeReactComponents: true,
34
+ shouldAlwaysCheckXcss: true
34
35
  }],
35
36
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
36
37
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  /**
8
8
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
- * @codegen <<SignedSource::aa1d9d67dc9b6b0488df0b31ff142f30>>
9
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -30,7 +30,8 @@ var _default = exports.default = {
30
30
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
31
31
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
32
32
  '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
33
- excludeReactComponents: true
33
+ excludeReactComponents: true,
34
+ shouldAlwaysCheckXcss: true
34
35
  }],
35
36
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
36
37
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -23,7 +23,9 @@ var externalRules = exports.externalRules = [{
23
23
  // When passing a css prop to a React component, we don't know whether the component
24
24
  // is Emotion or Compiled. Hence it is not safe to run autofixes like wrapping it in
25
25
  // a `css` function call.
26
- excludeReactComponents: true
26
+ excludeReactComponents: true,
27
+ // Ensures that `xcss` prop is still linted even when `excludeReactComponents` is `true`.
28
+ shouldAlwaysCheckXcss: true
27
29
  }
28
30
  }
29
31
  }, {
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -24,7 +24,8 @@ export default {
24
24
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
25
25
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
27
- excludeReactComponents: true
27
+ excludeReactComponents: true,
28
+ shouldAlwaysCheckXcss: true
28
29
  }],
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -24,7 +24,8 @@ export default {
24
24
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
25
25
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
27
- excludeReactComponents: true
27
+ excludeReactComponents: true,
28
+ shouldAlwaysCheckXcss: true
28
29
  }],
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -18,7 +18,9 @@ export const externalRules = [{
18
18
  // When passing a css prop to a React component, we don't know whether the component
19
19
  // is Emotion or Compiled. Hence it is not safe to run autofixes like wrapping it in
20
20
  // a `css` function call.
21
- excludeReactComponents: true
21
+ excludeReactComponents: true,
22
+ // Ensures that `xcss` prop is still linted even when `excludeReactComponents` is `true`.
23
+ shouldAlwaysCheckXcss: true
22
24
  }
23
25
  }
24
26
  }, {
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -24,7 +24,8 @@ export default {
24
24
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
25
25
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
27
- excludeReactComponents: true
27
+ excludeReactComponents: true,
28
+ shouldAlwaysCheckXcss: true
28
29
  }],
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -24,7 +24,8 @@ export default {
24
24
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
25
25
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
27
- excludeReactComponents: true
27
+ excludeReactComponents: true,
28
+ shouldAlwaysCheckXcss: true
28
29
  }],
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -18,7 +18,9 @@ export var externalRules = [{
18
18
  // When passing a css prop to a React component, we don't know whether the component
19
19
  // is Emotion or Compiled. Hence it is not safe to run autofixes like wrapping it in
20
20
  // a `css` function call.
21
- excludeReactComponents: true
21
+ excludeReactComponents: true,
22
+ // Ensures that `xcss` prop is still linted even when `excludeReactComponents` is `true`.
23
+ shouldAlwaysCheckXcss: true
22
24
  }
23
25
  }
24
26
  }, {
@@ -22,6 +22,7 @@ export declare const configs: {
22
22
  '@atlaskit/ui-styling-standard/use-compiled': string;
23
23
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
24
24
  excludeReactComponents: boolean;
25
+ shouldAlwaysCheckXcss: boolean;
25
26
  })[];
26
27
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
27
28
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
@@ -64,6 +65,7 @@ export declare const configs: {
64
65
  '@atlaskit/ui-styling-standard/use-compiled': string;
65
66
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
66
67
  excludeReactComponents: boolean;
68
+ shouldAlwaysCheckXcss: boolean;
67
69
  })[];
68
70
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
69
71
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  '@atlaskit/ui-styling-standard/use-compiled': string;
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
27
27
  excludeReactComponents: boolean;
28
+ shouldAlwaysCheckXcss: boolean;
28
29
  })[];
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  '@atlaskit/ui-styling-standard/use-compiled': string;
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
27
27
  excludeReactComponents: boolean;
28
+ shouldAlwaysCheckXcss: boolean;
28
29
  })[];
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
@@ -22,6 +22,7 @@ export declare const configs: {
22
22
  '@atlaskit/ui-styling-standard/use-compiled': string;
23
23
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
24
24
  excludeReactComponents: boolean;
25
+ shouldAlwaysCheckXcss: boolean;
25
26
  })[];
26
27
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
27
28
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
@@ -64,6 +65,7 @@ export declare const configs: {
64
65
  '@atlaskit/ui-styling-standard/use-compiled': string;
65
66
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
66
67
  excludeReactComponents: boolean;
68
+ shouldAlwaysCheckXcss: boolean;
67
69
  })[];
68
70
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
69
71
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  '@atlaskit/ui-styling-standard/use-compiled': string;
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
27
27
  excludeReactComponents: boolean;
28
+ shouldAlwaysCheckXcss: boolean;
28
29
  })[];
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  '@atlaskit/ui-styling-standard/use-compiled': string;
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
27
27
  excludeReactComponents: boolean;
28
+ shouldAlwaysCheckXcss: boolean;
28
29
  })[];
29
30
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
30
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-ui-styling-standard",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "author": "Atlassian Pty Ltd",
5
5
  "description": "The eslint plugin to enforce and educate on Atlassian's UI Styling Standard",
6
6
  "license": "Apache-2.0",
@@ -54,7 +54,7 @@
54
54
  "devDependencies": {
55
55
  "@af/formatting": "*",
56
56
  "@atlaskit/ds-lib": "^2.3.0",
57
- "@atlaskit/eslint-plugin-design-system": "^10.8.0",
57
+ "@atlaskit/eslint-plugin-design-system": "^10.10.0",
58
58
  "@atlassian/codegen": "*",
59
59
  "@compiled/eslint-plugin": "^0.13.6",
60
60
  "@types/eslint": "^8.56.6",
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -25,7 +25,7 @@ export default {
25
25
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': [
27
27
  'error',
28
- { excludeReactComponents: true },
28
+ { excludeReactComponents: true, shouldAlwaysCheckXcss: true },
29
29
  ],
30
30
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
31
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -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::aa1d9d67dc9b6b0488df0b31ff142f30>>
3
+ * @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -25,7 +25,7 @@ export default {
25
25
  '@atlaskit/ui-styling-standard/use-compiled': 'error',
26
26
  '@atlaskit/design-system/consistent-css-prop-usage': [
27
27
  'error',
28
- { excludeReactComponents: true },
28
+ { excludeReactComponents: true, shouldAlwaysCheckXcss: true },
29
29
  ],
30
30
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
31
31
  '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
@@ -36,6 +36,8 @@ export const externalRules: ExternalRuleMeta[] = [
36
36
  // is Emotion or Compiled. Hence it is not safe to run autofixes like wrapping it in
37
37
  // a `css` function call.
38
38
  excludeReactComponents: true,
39
+ // Ensures that `xcss` prop is still linted even when `excludeReactComponents` is `true`.
40
+ shouldAlwaysCheckXcss: true,
39
41
  },
40
42
  },
41
43
  },
@@ -4,7 +4,7 @@ import {
4
4
  hasStyleObjectArguments,
5
5
  } from '@atlaskit/eslint-utils/is-supported-import';
6
6
  import type { JSONSchema4 } from '@typescript-eslint/utils/dist/json-schema';
7
- import type { AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
7
+ import type { AST_NODE_TYPES } from '@typescript-eslint/typescript-estree/dist/ts-estree';
8
8
  import { findVariable } from '@atlaskit/eslint-utils/find-variable';
9
9
  import type { Rule } from 'eslint';
10
10
  import {