@atlaskit/eslint-plugin-ui-styling-standard 0.16.6 → 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 +16 -0
- package/afm-jira/tsconfig.json +2 -3
- package/dist/cjs/presets/all.codegen.js +28 -27
- package/dist/cjs/presets/recommended.codegen.js +28 -27
- package/dist/cjs/rules/enforce-style-prop/index.js +1 -1
- package/dist/cjs/rules/external-rules.js +13 -11
- package/dist/cjs/rules/local-cx-xcss/index.js +1 -1
- package/dist/cjs/rules/no-array-arguments/index.js +1 -1
- package/dist/cjs/rules/no-classname-prop/index.js +1 -1
- package/dist/cjs/rules/no-container-queries/index.js +1 -1
- package/dist/cjs/rules/no-dynamic-styles/index.js +1 -1
- package/dist/cjs/rules/no-exported-styles/index.js +1 -1
- package/dist/cjs/rules/no-global-styles/index.js +1 -1
- package/dist/cjs/rules/no-important-styles/index.js +1 -1
- package/dist/cjs/rules/no-imported-style-values/index.js +1 -1
- package/dist/cjs/rules/no-nested-selectors/index.js +1 -1
- package/dist/cjs/rules/no-styled/index.js +1 -1
- package/dist/cjs/rules/no-unsafe-selectors/index.js +1 -1
- package/dist/cjs/rules/no-unsafe-values/index.js +1 -1
- package/dist/cjs/rules/use-compiled/index.js +1 -1
- package/dist/es2019/presets/all.codegen.js +28 -27
- package/dist/es2019/presets/recommended.codegen.js +28 -27
- package/dist/es2019/rules/enforce-style-prop/index.js +1 -1
- package/dist/es2019/rules/external-rules.js +13 -11
- package/dist/es2019/rules/local-cx-xcss/index.js +1 -1
- package/dist/es2019/rules/no-array-arguments/index.js +1 -1
- package/dist/es2019/rules/no-classname-prop/index.js +1 -1
- package/dist/es2019/rules/no-container-queries/index.js +1 -1
- package/dist/es2019/rules/no-dynamic-styles/index.js +1 -1
- package/dist/es2019/rules/no-exported-styles/index.js +1 -1
- package/dist/es2019/rules/no-global-styles/index.js +1 -1
- package/dist/es2019/rules/no-important-styles/index.js +1 -1
- package/dist/es2019/rules/no-imported-style-values/index.js +1 -1
- package/dist/es2019/rules/no-nested-selectors/index.js +1 -1
- package/dist/es2019/rules/no-styled/index.js +1 -1
- package/dist/es2019/rules/no-unsafe-selectors/index.js +1 -1
- package/dist/es2019/rules/no-unsafe-values/index.js +1 -1
- package/dist/es2019/rules/use-compiled/index.js +1 -1
- package/dist/esm/presets/all.codegen.js +28 -27
- package/dist/esm/presets/recommended.codegen.js +28 -27
- package/dist/esm/rules/enforce-style-prop/index.js +1 -1
- package/dist/esm/rules/external-rules.js +13 -11
- package/dist/esm/rules/local-cx-xcss/index.js +1 -1
- package/dist/esm/rules/no-array-arguments/index.js +1 -1
- package/dist/esm/rules/no-classname-prop/index.js +1 -1
- package/dist/esm/rules/no-container-queries/index.js +1 -1
- package/dist/esm/rules/no-dynamic-styles/index.js +1 -1
- package/dist/esm/rules/no-exported-styles/index.js +1 -1
- package/dist/esm/rules/no-global-styles/index.js +1 -1
- package/dist/esm/rules/no-important-styles/index.js +1 -1
- package/dist/esm/rules/no-imported-style-values/index.js +1 -1
- package/dist/esm/rules/no-nested-selectors/index.js +1 -1
- package/dist/esm/rules/no-styled/index.js +1 -1
- package/dist/esm/rules/no-unsafe-selectors/index.js +1 -1
- package/dist/esm/rules/no-unsafe-values/index.js +1 -1
- package/dist/esm/rules/use-compiled/index.js +1 -1
- package/dist/types/index.codegen.d.ts +2 -0
- package/dist/types/presets/all.codegen.d.ts +2 -1
- package/dist/types/presets/recommended.codegen.d.ts +2 -1
- package/dist/types-ts4.5/index.codegen.d.ts +2 -0
- package/dist/types-ts4.5/presets/all.codegen.d.ts +2 -1
- package/dist/types-ts4.5/presets/recommended.codegen.d.ts +2 -1
- package/package.json +2 -2
- package/src/presets/all.codegen.tsx +29 -26
- package/src/presets/recommended.codegen.tsx +29 -26
- package/src/rules/enforce-style-prop/index.tsx +1 -1
- package/src/rules/external-rules.tsx +12 -10
- package/src/rules/local-cx-xcss/index.tsx +1 -1
- package/src/rules/no-array-arguments/index.tsx +1 -1
- package/src/rules/no-classname-prop/index.tsx +1 -1
- package/src/rules/no-container-queries/index.tsx +1 -1
- package/src/rules/no-dynamic-styles/index.tsx +1 -1
- package/src/rules/no-exported-styles/index.tsx +1 -1
- package/src/rules/no-global-styles/index.tsx +1 -1
- package/src/rules/no-important-styles/index.tsx +1 -1
- package/src/rules/no-imported-style-values/index.tsx +2 -2
- package/src/rules/no-nested-selectors/index.tsx +1 -1
- package/src/rules/no-styled/index.tsx +1 -1
- package/src/rules/no-unsafe-selectors/index.tsx +1 -1
- package/src/rules/no-unsafe-values/index.tsx +1 -1
- package/src/rules/use-compiled/index.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
11
|
+
## 0.17.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#110617](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110617)
|
|
16
|
+
[`6c94f6748cd97`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6c94f6748cd97) -
|
|
17
|
+
turning warn to error for ui styling standard rules
|
|
18
|
+
|
|
3
19
|
## 0.16.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../../../tsconfig.
|
|
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::
|
|
9
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
11
11
|
*/
|
|
12
12
|
var _default = exports.default = {
|
|
@@ -14,39 +14,40 @@ var _default = exports.default = {
|
|
|
14
14
|
rules: {
|
|
15
15
|
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
16
16
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
17
|
-
'@atlaskit/ui-styling-standard/enforce-style-prop': '
|
|
18
|
-
'@atlaskit/ui-styling-standard/local-cx-xcss': '
|
|
19
|
-
'@atlaskit/ui-styling-standard/no-array-arguments': '
|
|
20
|
-
'@atlaskit/ui-styling-standard/no-classname-prop': '
|
|
21
|
-
'@atlaskit/ui-styling-standard/no-container-queries': '
|
|
22
|
-
'@atlaskit/ui-styling-standard/no-dynamic-styles': '
|
|
23
|
-
'@atlaskit/ui-styling-standard/no-exported-styles': '
|
|
24
|
-
'@atlaskit/ui-styling-standard/no-global-styles': '
|
|
25
|
-
'@atlaskit/ui-styling-standard/no-important-styles': '
|
|
26
|
-
'@atlaskit/ui-styling-standard/no-imported-style-values': '
|
|
27
|
-
'@atlaskit/ui-styling-standard/no-nested-selectors': '
|
|
28
|
-
'@atlaskit/ui-styling-standard/no-styled': '
|
|
29
|
-
'@atlaskit/ui-styling-standard/no-unsafe-selectors': '
|
|
30
|
-
'@atlaskit/ui-styling-standard/no-unsafe-values': '
|
|
31
|
-
'@atlaskit/ui-styling-standard/use-compiled': '
|
|
32
|
-
'@atlaskit/design-system/consistent-css-prop-usage': ['
|
|
33
|
-
excludeReactComponents: true
|
|
17
|
+
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
18
|
+
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
20
|
+
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
22
|
+
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
23
|
+
'@atlaskit/ui-styling-standard/no-exported-styles': 'error',
|
|
24
|
+
'@atlaskit/ui-styling-standard/no-global-styles': 'error',
|
|
25
|
+
'@atlaskit/ui-styling-standard/no-important-styles': 'error',
|
|
26
|
+
'@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
|
|
27
|
+
'@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
|
|
28
|
+
'@atlaskit/ui-styling-standard/no-styled': 'error',
|
|
29
|
+
'@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
|
|
30
|
+
'@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
|
|
31
|
+
'@atlaskit/ui-styling-standard/use-compiled': 'error',
|
|
32
|
+
'@atlaskit/design-system/consistent-css-prop-usage': ['error', {
|
|
33
|
+
excludeReactComponents: true,
|
|
34
|
+
shouldAlwaysCheckXcss: true
|
|
34
35
|
}],
|
|
35
|
-
'@atlaskit/design-system/no-css-tagged-template-expression': '
|
|
36
|
-
'@atlaskit/design-system/no-keyframes-tagged-template-expression': '
|
|
37
|
-
'@atlaskit/design-system/no-styled-tagged-template-expression': '
|
|
38
|
-
'@compiled/no-suppress-xcss': '
|
|
39
|
-
'@compiled/no-js-xcss': '
|
|
40
|
-
'@atlaskit/design-system/no-empty-styled-expression': ['
|
|
36
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': 'error',
|
|
37
|
+
'@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
|
|
38
|
+
'@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
|
|
39
|
+
'@compiled/no-suppress-xcss': 'error',
|
|
40
|
+
'@compiled/no-js-xcss': 'error',
|
|
41
|
+
'@atlaskit/design-system/no-empty-styled-expression': ['error', {
|
|
41
42
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
42
43
|
}],
|
|
43
|
-
'@atlaskit/design-system/no-exported-css': ['
|
|
44
|
+
'@atlaskit/design-system/no-exported-css': ['error', {
|
|
44
45
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
45
46
|
}],
|
|
46
|
-
'@atlaskit/design-system/no-exported-keyframes': ['
|
|
47
|
+
'@atlaskit/design-system/no-exported-keyframes': ['error', {
|
|
47
48
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
48
49
|
}],
|
|
49
|
-
'@atlaskit/design-system/no-invalid-css-map': ['
|
|
50
|
+
'@atlaskit/design-system/no-invalid-css-map': ['error', {
|
|
50
51
|
allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
|
|
51
52
|
}]
|
|
52
53
|
}
|
|
@@ -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::
|
|
9
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
11
11
|
*/
|
|
12
12
|
var _default = exports.default = {
|
|
@@ -14,39 +14,40 @@ var _default = exports.default = {
|
|
|
14
14
|
rules: {
|
|
15
15
|
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
16
16
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
17
|
-
'@atlaskit/ui-styling-standard/enforce-style-prop': '
|
|
18
|
-
'@atlaskit/ui-styling-standard/local-cx-xcss': '
|
|
19
|
-
'@atlaskit/ui-styling-standard/no-array-arguments': '
|
|
20
|
-
'@atlaskit/ui-styling-standard/no-classname-prop': '
|
|
21
|
-
'@atlaskit/ui-styling-standard/no-container-queries': '
|
|
22
|
-
'@atlaskit/ui-styling-standard/no-dynamic-styles': '
|
|
23
|
-
'@atlaskit/ui-styling-standard/no-exported-styles': '
|
|
24
|
-
'@atlaskit/ui-styling-standard/no-global-styles': '
|
|
25
|
-
'@atlaskit/ui-styling-standard/no-important-styles': '
|
|
26
|
-
'@atlaskit/ui-styling-standard/no-imported-style-values': '
|
|
27
|
-
'@atlaskit/ui-styling-standard/no-nested-selectors': '
|
|
28
|
-
'@atlaskit/ui-styling-standard/no-styled': '
|
|
29
|
-
'@atlaskit/ui-styling-standard/no-unsafe-selectors': '
|
|
30
|
-
'@atlaskit/ui-styling-standard/no-unsafe-values': '
|
|
31
|
-
'@atlaskit/ui-styling-standard/use-compiled': '
|
|
32
|
-
'@atlaskit/design-system/consistent-css-prop-usage': ['
|
|
33
|
-
excludeReactComponents: true
|
|
17
|
+
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
18
|
+
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
20
|
+
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
22
|
+
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
23
|
+
'@atlaskit/ui-styling-standard/no-exported-styles': 'error',
|
|
24
|
+
'@atlaskit/ui-styling-standard/no-global-styles': 'error',
|
|
25
|
+
'@atlaskit/ui-styling-standard/no-important-styles': 'error',
|
|
26
|
+
'@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
|
|
27
|
+
'@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
|
|
28
|
+
'@atlaskit/ui-styling-standard/no-styled': 'error',
|
|
29
|
+
'@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
|
|
30
|
+
'@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
|
|
31
|
+
'@atlaskit/ui-styling-standard/use-compiled': 'error',
|
|
32
|
+
'@atlaskit/design-system/consistent-css-prop-usage': ['error', {
|
|
33
|
+
excludeReactComponents: true,
|
|
34
|
+
shouldAlwaysCheckXcss: true
|
|
34
35
|
}],
|
|
35
|
-
'@atlaskit/design-system/no-css-tagged-template-expression': '
|
|
36
|
-
'@atlaskit/design-system/no-keyframes-tagged-template-expression': '
|
|
37
|
-
'@atlaskit/design-system/no-styled-tagged-template-expression': '
|
|
38
|
-
'@compiled/no-suppress-xcss': '
|
|
39
|
-
'@compiled/no-js-xcss': '
|
|
40
|
-
'@atlaskit/design-system/no-empty-styled-expression': ['
|
|
36
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': 'error',
|
|
37
|
+
'@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
|
|
38
|
+
'@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
|
|
39
|
+
'@compiled/no-suppress-xcss': 'error',
|
|
40
|
+
'@compiled/no-js-xcss': 'error',
|
|
41
|
+
'@atlaskit/design-system/no-empty-styled-expression': ['error', {
|
|
41
42
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
42
43
|
}],
|
|
43
|
-
'@atlaskit/design-system/no-exported-css': ['
|
|
44
|
+
'@atlaskit/design-system/no-exported-css': ['error', {
|
|
44
45
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
45
46
|
}],
|
|
46
|
-
'@atlaskit/design-system/no-exported-keyframes': ['
|
|
47
|
+
'@atlaskit/design-system/no-exported-keyframes': ['error', {
|
|
47
48
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
48
49
|
}],
|
|
49
|
-
'@atlaskit/design-system/no-invalid-css-map': ['
|
|
50
|
+
'@atlaskit/design-system/no-invalid-css-map': ['error', {
|
|
50
51
|
allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
|
|
51
52
|
}]
|
|
52
53
|
}
|
|
@@ -117,7 +117,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
117
117
|
docs: {
|
|
118
118
|
description: 'Disallows usage of static styles in the `style` attribute in components',
|
|
119
119
|
recommended: true,
|
|
120
|
-
severity: '
|
|
120
|
+
severity: 'error'
|
|
121
121
|
},
|
|
122
122
|
messages: {
|
|
123
123
|
'enforce-style-prop': 'Avoid adding static values to the style prop. Use the css prop for static styles instead.'
|
|
@@ -18,12 +18,14 @@ var externalRules = exports.externalRules = [{
|
|
|
18
18
|
url: (0, _createRule.getRuleUrl)('consistent-css-prop-usage'),
|
|
19
19
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/consistent-css-prop-usage/usage',
|
|
20
20
|
recommended: true,
|
|
21
|
-
severity: '
|
|
21
|
+
severity: 'error',
|
|
22
22
|
pluginConfig: {
|
|
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
|
}, {
|
|
@@ -36,7 +38,7 @@ var externalRules = exports.externalRules = [{
|
|
|
36
38
|
url: (0, _createRule.getRuleUrl)('no-css-tagged-template-expression'),
|
|
37
39
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-css-tagged-template-expression/usage',
|
|
38
40
|
recommended: true,
|
|
39
|
-
severity: '
|
|
41
|
+
severity: 'error'
|
|
40
42
|
}
|
|
41
43
|
}, {
|
|
42
44
|
name: '@atlaskit/design-system/no-keyframes-tagged-template-expression',
|
|
@@ -48,7 +50,7 @@ var externalRules = exports.externalRules = [{
|
|
|
48
50
|
url: (0, _createRule.getRuleUrl)('no-keyframes-tagged-template-expression'),
|
|
49
51
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-keyframes-tagged-template-expression/usage',
|
|
50
52
|
recommended: true,
|
|
51
|
-
severity: '
|
|
53
|
+
severity: 'error'
|
|
52
54
|
}
|
|
53
55
|
}, {
|
|
54
56
|
name: '@atlaskit/design-system/no-styled-tagged-template-expression',
|
|
@@ -60,7 +62,7 @@ var externalRules = exports.externalRules = [{
|
|
|
60
62
|
url: (0, _createRule.getRuleUrl)('no-styled-tagged-template-expression'),
|
|
61
63
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-styled-tagged-template-expression/usage',
|
|
62
64
|
recommended: true,
|
|
63
|
-
severity: '
|
|
65
|
+
severity: 'error'
|
|
64
66
|
}
|
|
65
67
|
}, {
|
|
66
68
|
name: '@compiled/no-suppress-xcss',
|
|
@@ -71,7 +73,7 @@ var externalRules = exports.externalRules = [{
|
|
|
71
73
|
url: (0, _createRule.getRuleUrl)('no-suppress-xcss'),
|
|
72
74
|
externalUrl: 'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-suppress-xcss',
|
|
73
75
|
recommended: true,
|
|
74
|
-
severity: '
|
|
76
|
+
severity: 'error'
|
|
75
77
|
}
|
|
76
78
|
}, {
|
|
77
79
|
name: '@compiled/no-js-xcss',
|
|
@@ -82,7 +84,7 @@ var externalRules = exports.externalRules = [{
|
|
|
82
84
|
url: (0, _createRule.getRuleUrl)('no-js-xcss'),
|
|
83
85
|
externalUrl: 'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-js-xcss',
|
|
84
86
|
recommended: true,
|
|
85
|
-
severity: '
|
|
87
|
+
severity: 'error'
|
|
86
88
|
}
|
|
87
89
|
}, {
|
|
88
90
|
name: '@atlaskit/design-system/no-empty-styled-expression',
|
|
@@ -93,7 +95,7 @@ var externalRules = exports.externalRules = [{
|
|
|
93
95
|
url: (0, _createRule.getRuleUrl)('no-empty-styled-expression'),
|
|
94
96
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-empty-styled-expression/usage',
|
|
95
97
|
recommended: true,
|
|
96
|
-
severity: '
|
|
98
|
+
severity: 'error',
|
|
97
99
|
pluginConfig: {
|
|
98
100
|
importSources: importSources
|
|
99
101
|
}
|
|
@@ -107,7 +109,7 @@ var externalRules = exports.externalRules = [{
|
|
|
107
109
|
url: (0, _createRule.getRuleUrl)('no-exported-css'),
|
|
108
110
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-exported-css/usage',
|
|
109
111
|
recommended: true,
|
|
110
|
-
severity: '
|
|
112
|
+
severity: 'error',
|
|
111
113
|
pluginConfig: {
|
|
112
114
|
importSources: importSources
|
|
113
115
|
}
|
|
@@ -121,7 +123,7 @@ var externalRules = exports.externalRules = [{
|
|
|
121
123
|
url: (0, _createRule.getRuleUrl)('no-exported-keyframes'),
|
|
122
124
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-exported-keyframes/usage',
|
|
123
125
|
recommended: true,
|
|
124
|
-
severity: '
|
|
126
|
+
severity: 'error',
|
|
125
127
|
pluginConfig: {
|
|
126
128
|
importSources: importSources
|
|
127
129
|
}
|
|
@@ -135,7 +137,7 @@ var externalRules = exports.externalRules = [{
|
|
|
135
137
|
url: (0, _createRule.getRuleUrl)('no-invalid-css-map'),
|
|
136
138
|
externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-invalid-css-map/usage',
|
|
137
139
|
recommended: true,
|
|
138
|
-
severity: '
|
|
140
|
+
severity: 'error',
|
|
139
141
|
pluginConfig: {
|
|
140
142
|
allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
|
|
141
143
|
}
|
|
@@ -23,7 +23,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
23
23
|
docs: {
|
|
24
24
|
description: '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.',
|
|
25
25
|
recommended: true,
|
|
26
|
-
severity: '
|
|
26
|
+
severity: 'error'
|
|
27
27
|
},
|
|
28
28
|
messages: {
|
|
29
29
|
'local-cx-xcss': 'The cx function should only be declared inside the xcss prop to simplify tracking styles that are applied to a jsx element.'
|
|
@@ -27,7 +27,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
27
27
|
docs: {
|
|
28
28
|
description: 'Prevents usage of array arguments to style declaration functions',
|
|
29
29
|
recommended: true,
|
|
30
|
-
severity: '
|
|
30
|
+
severity: 'error'
|
|
31
31
|
},
|
|
32
32
|
messages: {
|
|
33
33
|
'no-array-arguments': "Don't pass multiple value in an array. Pass them as multiple arguments instead."
|
|
@@ -12,7 +12,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
12
12
|
docs: {
|
|
13
13
|
description: 'Disallows usage of the `className` prop in JSX',
|
|
14
14
|
recommended: true,
|
|
15
|
-
severity: '
|
|
15
|
+
severity: 'error'
|
|
16
16
|
},
|
|
17
17
|
messages: {
|
|
18
18
|
'no-classname-prop': 'Avoid `className` because it invites the use of unsafe global styles and is impossible to determine via local tooling.'
|
|
@@ -26,7 +26,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
26
26
|
docs: {
|
|
27
27
|
description: 'Prevents usage of @container query within css styling',
|
|
28
28
|
recommended: true,
|
|
29
|
-
severity: '
|
|
29
|
+
severity: 'error'
|
|
30
30
|
},
|
|
31
31
|
messages: {
|
|
32
32
|
'no-container-queries': 'We block @container queries as they break scope and are not type-safe. We suggest alternatives such as JS-based APIs or @media queries.'
|
|
@@ -26,7 +26,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
26
26
|
docs: {
|
|
27
27
|
description: 'Disallows exports of css, keyframes, styled and xcss',
|
|
28
28
|
recommended: true,
|
|
29
|
-
severity: '
|
|
29
|
+
severity: 'error'
|
|
30
30
|
},
|
|
31
31
|
messages: {
|
|
32
32
|
'no-exported-styles': 'Styles from css, cssMap, keyframes, styled and xcss should not be exported. All styles should be defined and used in the same file instead.'
|
|
@@ -23,7 +23,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
23
23
|
docs: {
|
|
24
24
|
description: 'Prevents global styles through CSS-in-JS or CSS module imports',
|
|
25
25
|
recommended: true,
|
|
26
|
-
severity: '
|
|
26
|
+
severity: 'error'
|
|
27
27
|
},
|
|
28
28
|
messages: {
|
|
29
29
|
'no-global-styles': 'Global styles are not allowed.',
|
|
@@ -18,7 +18,7 @@ var rule = exports.rule = (0, _createRuleWithTypedConfig.createLintRuleWithTyped
|
|
|
18
18
|
docs: {
|
|
19
19
|
description: 'Disallows important style declarations',
|
|
20
20
|
recommended: true,
|
|
21
|
-
severity: '
|
|
21
|
+
severity: 'error'
|
|
22
22
|
},
|
|
23
23
|
messages: {
|
|
24
24
|
'no-important-styles': 'Important style declarations are disallowed. Refactor so the `!important` flag is not needed.'
|
|
@@ -105,7 +105,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
105
105
|
docs: {
|
|
106
106
|
description: 'Disallows imports of style values',
|
|
107
107
|
recommended: true,
|
|
108
|
-
severity: '
|
|
108
|
+
severity: 'error'
|
|
109
109
|
},
|
|
110
110
|
messages: {
|
|
111
111
|
'no-imported-style-values': 'Styles should not be imported to use in css, cssMap, styled, keyframes or xcss calls. All styles should be defined and used in the same file instead.'
|
|
@@ -46,7 +46,7 @@ var rule = exports.rule = (0, _createRuleWithTypedConfig.createLintRuleWithTyped
|
|
|
46
46
|
docs: {
|
|
47
47
|
description: 'Prevents usage of nested selectors within css styling',
|
|
48
48
|
recommended: true,
|
|
49
|
-
severity: '
|
|
49
|
+
severity: 'error'
|
|
50
50
|
},
|
|
51
51
|
messages: {
|
|
52
52
|
'no-nested-selectors': 'Please avoid setting styles for child elements or elements that require context from other elements.'
|
|
@@ -12,7 +12,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
12
12
|
docs: {
|
|
13
13
|
description: 'Disallows usage of the `styled` imports',
|
|
14
14
|
recommended: true,
|
|
15
|
-
severity: '
|
|
15
|
+
severity: 'error'
|
|
16
16
|
},
|
|
17
17
|
messages: {
|
|
18
18
|
'no-styled': "Avoid usages of styled, eg. styled.div, styled('div'), styled(Component), etc."
|
|
@@ -20,7 +20,7 @@ var rule = (0, _createRuleWithTypedConfig.createLintRuleWithTypedConfig)({
|
|
|
20
20
|
docs: {
|
|
21
21
|
description: 'Disallows use of nested styles in `css` functions.',
|
|
22
22
|
recommended: true,
|
|
23
|
-
severity: '
|
|
23
|
+
severity: 'error'
|
|
24
24
|
},
|
|
25
25
|
fixable: 'code',
|
|
26
26
|
hasSuggestions: true,
|
|
@@ -55,7 +55,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
55
55
|
docs: {
|
|
56
56
|
description: 'Disallows styles that are difficult/impossible to statically anaylze.',
|
|
57
57
|
recommended: true,
|
|
58
|
-
severity: '
|
|
58
|
+
severity: 'error'
|
|
59
59
|
},
|
|
60
60
|
messages: _messages.messages,
|
|
61
61
|
type: 'problem',
|
|
@@ -52,7 +52,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
52
52
|
docs: {
|
|
53
53
|
description: 'Ensures usage of `@compiled/react` instead of other CSS-in-JS libraries',
|
|
54
54
|
recommended: true,
|
|
55
|
-
severity: '
|
|
55
|
+
severity: 'error'
|
|
56
56
|
},
|
|
57
57
|
messages: {
|
|
58
58
|
'use-compiled': "Use '@compiled/react' instead of '{{importSource}}'"
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
@@ -8,39 +8,40 @@ export default {
|
|
|
8
8
|
rules: {
|
|
9
9
|
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
10
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
11
|
-
'@atlaskit/ui-styling-standard/enforce-style-prop': '
|
|
12
|
-
'@atlaskit/ui-styling-standard/local-cx-xcss': '
|
|
13
|
-
'@atlaskit/ui-styling-standard/no-array-arguments': '
|
|
14
|
-
'@atlaskit/ui-styling-standard/no-classname-prop': '
|
|
15
|
-
'@atlaskit/ui-styling-standard/no-container-queries': '
|
|
16
|
-
'@atlaskit/ui-styling-standard/no-dynamic-styles': '
|
|
17
|
-
'@atlaskit/ui-styling-standard/no-exported-styles': '
|
|
18
|
-
'@atlaskit/ui-styling-standard/no-global-styles': '
|
|
19
|
-
'@atlaskit/ui-styling-standard/no-important-styles': '
|
|
20
|
-
'@atlaskit/ui-styling-standard/no-imported-style-values': '
|
|
21
|
-
'@atlaskit/ui-styling-standard/no-nested-selectors': '
|
|
22
|
-
'@atlaskit/ui-styling-standard/no-styled': '
|
|
23
|
-
'@atlaskit/ui-styling-standard/no-unsafe-selectors': '
|
|
24
|
-
'@atlaskit/ui-styling-standard/no-unsafe-values': '
|
|
25
|
-
'@atlaskit/ui-styling-standard/use-compiled': '
|
|
26
|
-
'@atlaskit/design-system/consistent-css-prop-usage': ['
|
|
27
|
-
excludeReactComponents: true
|
|
11
|
+
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
12
|
+
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
13
|
+
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
14
|
+
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
16
|
+
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
17
|
+
'@atlaskit/ui-styling-standard/no-exported-styles': 'error',
|
|
18
|
+
'@atlaskit/ui-styling-standard/no-global-styles': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-important-styles': 'error',
|
|
20
|
+
'@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
|
|
22
|
+
'@atlaskit/ui-styling-standard/no-styled': 'error',
|
|
23
|
+
'@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
|
|
24
|
+
'@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
|
|
25
|
+
'@atlaskit/ui-styling-standard/use-compiled': 'error',
|
|
26
|
+
'@atlaskit/design-system/consistent-css-prop-usage': ['error', {
|
|
27
|
+
excludeReactComponents: true,
|
|
28
|
+
shouldAlwaysCheckXcss: true
|
|
28
29
|
}],
|
|
29
|
-
'@atlaskit/design-system/no-css-tagged-template-expression': '
|
|
30
|
-
'@atlaskit/design-system/no-keyframes-tagged-template-expression': '
|
|
31
|
-
'@atlaskit/design-system/no-styled-tagged-template-expression': '
|
|
32
|
-
'@compiled/no-suppress-xcss': '
|
|
33
|
-
'@compiled/no-js-xcss': '
|
|
34
|
-
'@atlaskit/design-system/no-empty-styled-expression': ['
|
|
30
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': 'error',
|
|
31
|
+
'@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
|
|
32
|
+
'@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
|
|
33
|
+
'@compiled/no-suppress-xcss': 'error',
|
|
34
|
+
'@compiled/no-js-xcss': 'error',
|
|
35
|
+
'@atlaskit/design-system/no-empty-styled-expression': ['error', {
|
|
35
36
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
36
37
|
}],
|
|
37
|
-
'@atlaskit/design-system/no-exported-css': ['
|
|
38
|
+
'@atlaskit/design-system/no-exported-css': ['error', {
|
|
38
39
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
39
40
|
}],
|
|
40
|
-
'@atlaskit/design-system/no-exported-keyframes': ['
|
|
41
|
+
'@atlaskit/design-system/no-exported-keyframes': ['error', {
|
|
41
42
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
42
43
|
}],
|
|
43
|
-
'@atlaskit/design-system/no-invalid-css-map': ['
|
|
44
|
+
'@atlaskit/design-system/no-invalid-css-map': ['error', {
|
|
44
45
|
allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
|
|
45
46
|
}]
|
|
46
47
|
}
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
@@ -8,39 +8,40 @@ export default {
|
|
|
8
8
|
rules: {
|
|
9
9
|
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
10
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
11
|
-
'@atlaskit/ui-styling-standard/enforce-style-prop': '
|
|
12
|
-
'@atlaskit/ui-styling-standard/local-cx-xcss': '
|
|
13
|
-
'@atlaskit/ui-styling-standard/no-array-arguments': '
|
|
14
|
-
'@atlaskit/ui-styling-standard/no-classname-prop': '
|
|
15
|
-
'@atlaskit/ui-styling-standard/no-container-queries': '
|
|
16
|
-
'@atlaskit/ui-styling-standard/no-dynamic-styles': '
|
|
17
|
-
'@atlaskit/ui-styling-standard/no-exported-styles': '
|
|
18
|
-
'@atlaskit/ui-styling-standard/no-global-styles': '
|
|
19
|
-
'@atlaskit/ui-styling-standard/no-important-styles': '
|
|
20
|
-
'@atlaskit/ui-styling-standard/no-imported-style-values': '
|
|
21
|
-
'@atlaskit/ui-styling-standard/no-nested-selectors': '
|
|
22
|
-
'@atlaskit/ui-styling-standard/no-styled': '
|
|
23
|
-
'@atlaskit/ui-styling-standard/no-unsafe-selectors': '
|
|
24
|
-
'@atlaskit/ui-styling-standard/no-unsafe-values': '
|
|
25
|
-
'@atlaskit/ui-styling-standard/use-compiled': '
|
|
26
|
-
'@atlaskit/design-system/consistent-css-prop-usage': ['
|
|
27
|
-
excludeReactComponents: true
|
|
11
|
+
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
12
|
+
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
13
|
+
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
14
|
+
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
16
|
+
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
17
|
+
'@atlaskit/ui-styling-standard/no-exported-styles': 'error',
|
|
18
|
+
'@atlaskit/ui-styling-standard/no-global-styles': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-important-styles': 'error',
|
|
20
|
+
'@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
|
|
22
|
+
'@atlaskit/ui-styling-standard/no-styled': 'error',
|
|
23
|
+
'@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
|
|
24
|
+
'@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
|
|
25
|
+
'@atlaskit/ui-styling-standard/use-compiled': 'error',
|
|
26
|
+
'@atlaskit/design-system/consistent-css-prop-usage': ['error', {
|
|
27
|
+
excludeReactComponents: true,
|
|
28
|
+
shouldAlwaysCheckXcss: true
|
|
28
29
|
}],
|
|
29
|
-
'@atlaskit/design-system/no-css-tagged-template-expression': '
|
|
30
|
-
'@atlaskit/design-system/no-keyframes-tagged-template-expression': '
|
|
31
|
-
'@atlaskit/design-system/no-styled-tagged-template-expression': '
|
|
32
|
-
'@compiled/no-suppress-xcss': '
|
|
33
|
-
'@compiled/no-js-xcss': '
|
|
34
|
-
'@atlaskit/design-system/no-empty-styled-expression': ['
|
|
30
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': 'error',
|
|
31
|
+
'@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
|
|
32
|
+
'@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
|
|
33
|
+
'@compiled/no-suppress-xcss': 'error',
|
|
34
|
+
'@compiled/no-js-xcss': 'error',
|
|
35
|
+
'@atlaskit/design-system/no-empty-styled-expression': ['error', {
|
|
35
36
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
36
37
|
}],
|
|
37
|
-
'@atlaskit/design-system/no-exported-css': ['
|
|
38
|
+
'@atlaskit/design-system/no-exported-css': ['error', {
|
|
38
39
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
39
40
|
}],
|
|
40
|
-
'@atlaskit/design-system/no-exported-keyframes': ['
|
|
41
|
+
'@atlaskit/design-system/no-exported-keyframes': ['error', {
|
|
41
42
|
importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
|
|
42
43
|
}],
|
|
43
|
-
'@atlaskit/design-system/no-invalid-css-map': ['
|
|
44
|
+
'@atlaskit/design-system/no-invalid-css-map': ['error', {
|
|
44
45
|
allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
|
|
45
46
|
}]
|
|
46
47
|
}
|
|
@@ -111,7 +111,7 @@ export const rule = createLintRule({
|
|
|
111
111
|
docs: {
|
|
112
112
|
description: 'Disallows usage of static styles in the `style` attribute in components',
|
|
113
113
|
recommended: true,
|
|
114
|
-
severity: '
|
|
114
|
+
severity: 'error'
|
|
115
115
|
},
|
|
116
116
|
messages: {
|
|
117
117
|
'enforce-style-prop': 'Avoid adding static values to the style prop. Use the css prop for static styles instead.'
|