@atlaskit/eslint-plugin-ui-styling-standard 0.1.0 → 0.2.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,15 @@
1
1
  # @atlaskit/eslint-plugin-ui-styling-standard
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#69723](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69723) [`06cd0f04fefb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/06cd0f04fefb) - Adds the following rules to the recommended config:
8
+
9
+ - `local-cx-xcss` - Ensures the `cx()` function is only used within the `xcss` prop
10
+ - `no-supress-xcss` - Disallows supressing type violations when using the `xcss` prop
11
+ - `no-js-xcss` - Disallows using `xcss` prop inside JavaScript files
12
+
3
13
  ## 0.1.0
4
14
 
5
15
  ### Minor Changes
package/README.md CHANGED
@@ -5,3 +5,11 @@ The UI Styling Standard plugin utilizes rules from across Atlassian, Open Source
5
5
  ## Installation
6
6
 
7
7
  Not intended for use outside the Atlassian frontend repository.
8
+
9
+ ## Rules
10
+
11
+ | Rule | Description | Recommended | Fixable | Suggestions |
12
+ | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------- | ----------- |
13
+ | <a href="../eslint-plugin/src/rules/local-cx-xcss/README.md">local-cx-xcss</a> | Ensures the cx() function, which is part of the XCSS API, is only used within the xcss prop. This aids tracking what styles are applied to a jsx element. | Yes | | |
14
+ | <a href="https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-suppress-xcss">no-suppress-xcss</a> | Disallows supressing type violations when using the xcss prop | Yes | | |
15
+ | <a href="https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-js-xcss">no-js-xcss</a> | Disallows using xcss prop inside JavaScript files | Yes | | |
@@ -0,0 +1,21 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.confluence.json",
3
+ "compilerOptions": {
4
+ "target": "es5",
5
+ "outDir": "../dist",
6
+ "rootDir": "../",
7
+ "baseUrl": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../__tests__/*",
17
+ "../src/**/*.test.*",
18
+ "../src/**/test.*"
19
+ ],
20
+ "references": []
21
+ }
package/dist/cjs/index.js CHANGED
@@ -9,7 +9,10 @@ var configs = exports.configs = {
9
9
  recommended: {
10
10
  plugins: ['@atlaskit/eslint-plugin-ui-styling-standard'],
11
11
  rules: {
12
- '@atlaskit/design-system/consistent-css-prop-usage': 'error'
12
+ '@atlaskit/design-system/consistent-css-prop-usage': 'error',
13
+ '@atlaskit/design-system/local-cx-xcss': 'error',
14
+ '@compiled/no-suppress-xcss': 'error',
15
+ '@compiled/no-js-xcss': 'error'
13
16
  }
14
17
  }
15
18
  };
@@ -3,7 +3,10 @@ export const configs = {
3
3
  recommended: {
4
4
  plugins: ['@atlaskit/eslint-plugin-ui-styling-standard'],
5
5
  rules: {
6
- '@atlaskit/design-system/consistent-css-prop-usage': 'error'
6
+ '@atlaskit/design-system/consistent-css-prop-usage': 'error',
7
+ '@atlaskit/design-system/local-cx-xcss': 'error',
8
+ '@compiled/no-suppress-xcss': 'error',
9
+ '@compiled/no-js-xcss': 'error'
7
10
  }
8
11
  }
9
12
  };
package/dist/esm/index.js CHANGED
@@ -3,7 +3,10 @@ export var configs = {
3
3
  recommended: {
4
4
  plugins: ['@atlaskit/eslint-plugin-ui-styling-standard'],
5
5
  rules: {
6
- '@atlaskit/design-system/consistent-css-prop-usage': 'error'
6
+ '@atlaskit/design-system/consistent-css-prop-usage': 'error',
7
+ '@atlaskit/design-system/local-cx-xcss': 'error',
8
+ '@compiled/no-suppress-xcss': 'error',
9
+ '@compiled/no-js-xcss': 'error'
7
10
  }
8
11
  }
9
12
  };
@@ -4,6 +4,9 @@ export declare const configs: {
4
4
  plugins: string[];
5
5
  rules: {
6
6
  '@atlaskit/design-system/consistent-css-prop-usage': string;
7
+ '@atlaskit/design-system/local-cx-xcss': string;
8
+ '@compiled/no-suppress-xcss': string;
9
+ '@compiled/no-js-xcss': string;
7
10
  };
8
11
  };
9
12
  };
@@ -4,6 +4,9 @@ export declare const configs: {
4
4
  plugins: string[];
5
5
  rules: {
6
6
  '@atlaskit/design-system/consistent-css-prop-usage': string;
7
+ '@atlaskit/design-system/local-cx-xcss': string;
8
+ '@compiled/no-suppress-xcss': string;
9
+ '@compiled/no-js-xcss': string;
7
10
  };
8
11
  };
9
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-ui-styling-standard",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "Atlassian Pty Ltd",
5
5
  "description": "The Atlassian UI Styling Standard Plugin Package - used to enforce Atlassian's styling standards within internal applications",
6
6
  "license": "UNLICENSED",
@@ -35,7 +35,7 @@
35
35
  "@babel/runtime": "^7.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@atlaskit/eslint-plugin-design-system": "^8.15.4",
38
+ "@atlaskit/eslint-plugin-design-system": "^8.25.0",
39
39
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
40
40
  "@types/eslint": "^8.4.5",
41
41
  "eslint": "^7.7.0",
package/src/index.tsx CHANGED
@@ -5,6 +5,9 @@ export const configs = {
5
5
  plugins: ['@atlaskit/eslint-plugin-ui-styling-standard'],
6
6
  rules: {
7
7
  '@atlaskit/design-system/consistent-css-prop-usage': 'error',
8
+ '@atlaskit/design-system/local-cx-xcss': 'error',
9
+ '@compiled/no-suppress-xcss': 'error',
10
+ '@compiled/no-js-xcss': 'error',
8
11
  },
9
12
  },
10
13
  };