@atlaskit/eslint-plugin-ui-styling-standard 0.16.5 → 0.17.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/presets/all.codegen.js +26 -26
  3. package/dist/cjs/presets/recommended.codegen.js +26 -26
  4. package/dist/cjs/rules/enforce-style-prop/index.js +5 -5
  5. package/dist/cjs/rules/external-rules.js +10 -10
  6. package/dist/cjs/rules/local-cx-xcss/index.js +1 -1
  7. package/dist/cjs/rules/no-array-arguments/index.js +1 -1
  8. package/dist/cjs/rules/no-classname-prop/index.js +1 -1
  9. package/dist/cjs/rules/no-container-queries/index.js +1 -1
  10. package/dist/cjs/rules/no-dynamic-styles/index.js +1 -1
  11. package/dist/cjs/rules/no-exported-styles/index.js +1 -1
  12. package/dist/cjs/rules/no-global-styles/index.js +1 -1
  13. package/dist/cjs/rules/no-important-styles/index.js +1 -1
  14. package/dist/cjs/rules/no-imported-style-values/index.js +2 -2
  15. package/dist/cjs/rules/no-nested-selectors/index.js +1 -1
  16. package/dist/cjs/rules/no-styled/index.js +1 -1
  17. package/dist/cjs/rules/no-unsafe-selectors/index.js +1 -1
  18. package/dist/cjs/rules/no-unsafe-values/index.js +1 -1
  19. package/dist/cjs/rules/no-unsafe-values/utils.js +3 -3
  20. package/dist/cjs/rules/use-compiled/index.js +1 -1
  21. package/dist/es2019/presets/all.codegen.js +26 -26
  22. package/dist/es2019/presets/recommended.codegen.js +26 -26
  23. package/dist/es2019/rules/enforce-style-prop/index.js +5 -5
  24. package/dist/es2019/rules/external-rules.js +10 -10
  25. package/dist/es2019/rules/local-cx-xcss/index.js +1 -1
  26. package/dist/es2019/rules/no-array-arguments/index.js +1 -1
  27. package/dist/es2019/rules/no-classname-prop/index.js +1 -1
  28. package/dist/es2019/rules/no-container-queries/index.js +1 -1
  29. package/dist/es2019/rules/no-dynamic-styles/index.js +1 -1
  30. package/dist/es2019/rules/no-exported-styles/index.js +1 -1
  31. package/dist/es2019/rules/no-global-styles/index.js +1 -1
  32. package/dist/es2019/rules/no-important-styles/index.js +1 -1
  33. package/dist/es2019/rules/no-imported-style-values/index.js +2 -2
  34. package/dist/es2019/rules/no-nested-selectors/index.js +1 -1
  35. package/dist/es2019/rules/no-styled/index.js +1 -1
  36. package/dist/es2019/rules/no-unsafe-selectors/index.js +1 -1
  37. package/dist/es2019/rules/no-unsafe-values/index.js +1 -1
  38. package/dist/es2019/rules/no-unsafe-values/utils.js +3 -3
  39. package/dist/es2019/rules/use-compiled/index.js +1 -1
  40. package/dist/esm/presets/all.codegen.js +26 -26
  41. package/dist/esm/presets/recommended.codegen.js +26 -26
  42. package/dist/esm/rules/enforce-style-prop/index.js +5 -5
  43. package/dist/esm/rules/external-rules.js +10 -10
  44. package/dist/esm/rules/local-cx-xcss/index.js +1 -1
  45. package/dist/esm/rules/no-array-arguments/index.js +1 -1
  46. package/dist/esm/rules/no-classname-prop/index.js +1 -1
  47. package/dist/esm/rules/no-container-queries/index.js +1 -1
  48. package/dist/esm/rules/no-dynamic-styles/index.js +1 -1
  49. package/dist/esm/rules/no-exported-styles/index.js +1 -1
  50. package/dist/esm/rules/no-global-styles/index.js +1 -1
  51. package/dist/esm/rules/no-important-styles/index.js +1 -1
  52. package/dist/esm/rules/no-imported-style-values/index.js +2 -2
  53. package/dist/esm/rules/no-nested-selectors/index.js +1 -1
  54. package/dist/esm/rules/no-styled/index.js +1 -1
  55. package/dist/esm/rules/no-unsafe-selectors/index.js +1 -1
  56. package/dist/esm/rules/no-unsafe-values/index.js +1 -1
  57. package/dist/esm/rules/no-unsafe-values/utils.js +3 -3
  58. package/dist/esm/rules/use-compiled/index.js +1 -1
  59. package/dist/types/presets/all.codegen.d.ts +1 -1
  60. package/dist/types/presets/recommended.codegen.d.ts +1 -1
  61. package/dist/types-ts4.5/presets/all.codegen.d.ts +1 -1
  62. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +1 -1
  63. package/package.json +2 -2
  64. package/src/presets/all.codegen.tsx +29 -26
  65. package/src/presets/recommended.codegen.tsx +29 -26
  66. package/src/rules/enforce-style-prop/index.tsx +5 -5
  67. package/src/rules/external-rules.tsx +10 -10
  68. package/src/rules/local-cx-xcss/index.tsx +1 -1
  69. package/src/rules/no-array-arguments/index.tsx +1 -1
  70. package/src/rules/no-classname-prop/index.tsx +1 -1
  71. package/src/rules/no-container-queries/index.tsx +1 -1
  72. package/src/rules/no-dynamic-styles/index.tsx +1 -1
  73. package/src/rules/no-exported-styles/index.tsx +1 -1
  74. package/src/rules/no-global-styles/index.tsx +1 -1
  75. package/src/rules/no-important-styles/index.tsx +1 -1
  76. package/src/rules/no-imported-style-values/index.tsx +2 -2
  77. package/src/rules/no-nested-selectors/index.tsx +1 -1
  78. package/src/rules/no-styled/index.tsx +1 -1
  79. package/src/rules/no-unsafe-selectors/index.tsx +1 -1
  80. package/src/rules/no-unsafe-values/index.tsx +1 -1
  81. package/src/rules/no-unsafe-values/utils.tsx +3 -3
  82. package/src/rules/use-compiled/index.tsx +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/eslint-plugin-ui-styling-standard
2
2
 
3
+ ## 0.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#110617](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110617)
8
+ [`6c94f6748cd97`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6c94f6748cd97) -
9
+ turning warn to error for ui styling standard rules
10
+
11
+ ## 0.16.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [#112386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112386)
16
+ [`762c18186f898`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/762c18186f898) -
17
+ Internal refactoring to use `context.getSourceCode()` instead of `context.sourceCode` to better
18
+ support older versions of eslint.
19
+
3
20
  ## 0.16.5
4
21
 
5
22
  ### Patch Changes
@@ -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::f240d1cd5b93827327b66c28ad47e698>>
9
+ * @codegen <<SignedSource::aa1d9d67dc9b6b0488df0b31ff142f30>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -14,39 +14,39 @@ 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': 'warn',
18
- '@atlaskit/ui-styling-standard/local-cx-xcss': 'warn',
19
- '@atlaskit/ui-styling-standard/no-array-arguments': 'warn',
20
- '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
21
- '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
22
- '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
23
- '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
24
- '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
25
- '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
26
- '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
27
- '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
28
- '@atlaskit/ui-styling-standard/no-styled': 'warn',
29
- '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'warn',
30
- '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
31
- '@atlaskit/ui-styling-standard/use-compiled': 'warn',
32
- '@atlaskit/design-system/consistent-css-prop-usage': ['warn', {
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
33
  excludeReactComponents: true
34
34
  }],
35
- '@atlaskit/design-system/no-css-tagged-template-expression': 'warn',
36
- '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'warn',
37
- '@atlaskit/design-system/no-styled-tagged-template-expression': 'warn',
38
- '@compiled/no-suppress-xcss': 'warn',
39
- '@compiled/no-js-xcss': 'warn',
40
- '@atlaskit/design-system/no-empty-styled-expression': ['warn', {
35
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
36
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
37
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
38
+ '@compiled/no-suppress-xcss': 'error',
39
+ '@compiled/no-js-xcss': 'error',
40
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
41
41
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
42
42
  }],
43
- '@atlaskit/design-system/no-exported-css': ['warn', {
43
+ '@atlaskit/design-system/no-exported-css': ['error', {
44
44
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
45
45
  }],
46
- '@atlaskit/design-system/no-exported-keyframes': ['warn', {
46
+ '@atlaskit/design-system/no-exported-keyframes': ['error', {
47
47
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
48
48
  }],
49
- '@atlaskit/design-system/no-invalid-css-map': ['warn', {
49
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
50
50
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
51
51
  }]
52
52
  }
@@ -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::f240d1cd5b93827327b66c28ad47e698>>
9
+ * @codegen <<SignedSource::aa1d9d67dc9b6b0488df0b31ff142f30>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -14,39 +14,39 @@ 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': 'warn',
18
- '@atlaskit/ui-styling-standard/local-cx-xcss': 'warn',
19
- '@atlaskit/ui-styling-standard/no-array-arguments': 'warn',
20
- '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
21
- '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
22
- '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
23
- '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
24
- '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
25
- '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
26
- '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
27
- '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
28
- '@atlaskit/ui-styling-standard/no-styled': 'warn',
29
- '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'warn',
30
- '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
31
- '@atlaskit/ui-styling-standard/use-compiled': 'warn',
32
- '@atlaskit/design-system/consistent-css-prop-usage': ['warn', {
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
33
  excludeReactComponents: true
34
34
  }],
35
- '@atlaskit/design-system/no-css-tagged-template-expression': 'warn',
36
- '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'warn',
37
- '@atlaskit/design-system/no-styled-tagged-template-expression': 'warn',
38
- '@compiled/no-suppress-xcss': 'warn',
39
- '@compiled/no-js-xcss': 'warn',
40
- '@atlaskit/design-system/no-empty-styled-expression': ['warn', {
35
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
36
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
37
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
38
+ '@compiled/no-suppress-xcss': 'error',
39
+ '@compiled/no-js-xcss': 'error',
40
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
41
41
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
42
42
  }],
43
- '@atlaskit/design-system/no-exported-css': ['warn', {
43
+ '@atlaskit/design-system/no-exported-css': ['error', {
44
44
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
45
45
  }],
46
- '@atlaskit/design-system/no-exported-keyframes': ['warn', {
46
+ '@atlaskit/design-system/no-exported-keyframes': ['error', {
47
47
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
48
48
  }],
49
- '@atlaskit/design-system/no-invalid-css-map': ['warn', {
49
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
50
50
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
51
51
  }]
52
52
  }
@@ -11,7 +11,7 @@ var _findVariable3 = require("@atlaskit/eslint-utils/find-variable");
11
11
  var isParameter = function isParameter(context, identifier) {
12
12
  var _findVariable;
13
13
  var definitions = (_findVariable = (0, _findVariable3.findVariable)({
14
- sourceCode: context.sourceCode,
14
+ sourceCode: context.getSourceCode(),
15
15
  identifier: identifier
16
16
  })) === null || _findVariable === void 0 ? void 0 : _findVariable.defs;
17
17
  if (!definitions || !definitions.length) {
@@ -23,7 +23,7 @@ var isParameter = function isParameter(context, identifier) {
23
23
  var isIdentifierAllowed = function isIdentifierAllowed(context, identifier) {
24
24
  var _parent;
25
25
  var variable = (0, _findVariable3.findVariable)({
26
- sourceCode: context.sourceCode,
26
+ sourceCode: context.getSourceCode(),
27
27
  identifier: identifier
28
28
  });
29
29
  if (!variable) {
@@ -70,7 +70,7 @@ function isPropertyValueAllowed(property, context) {
70
70
  return isIdentifierAllowed(context, property.value);
71
71
  } else if (property.value.type === 'CallExpression' && property.value.callee.type === 'Identifier') {
72
72
  var variable = (0, _findVariable3.findVariable)({
73
- sourceCode: context.sourceCode,
73
+ sourceCode: context.getSourceCode(),
74
74
  identifier: property.value.callee
75
75
  });
76
76
  // Anything returned by getAllowedFunctionCalls should be used in css prop instead
@@ -84,7 +84,7 @@ function isPropertyValueAllowed(property, context) {
84
84
  } else if (property.value.type === 'MemberExpression' && property.value.object.type === 'Identifier') {
85
85
  var _findVariable2;
86
86
  var definitions = (_findVariable2 = (0, _findVariable3.findVariable)({
87
- sourceCode: context.sourceCode,
87
+ sourceCode: context.getSourceCode(),
88
88
  identifier: property.value.object
89
89
  })) === null || _findVariable2 === void 0 ? void 0 : _findVariable2.defs;
90
90
  if (!definitions || !definitions.length) {
@@ -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: 'warn'
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,7 +18,7 @@ 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: 'warn',
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
@@ -36,7 +36,7 @@ var externalRules = exports.externalRules = [{
36
36
  url: (0, _createRule.getRuleUrl)('no-css-tagged-template-expression'),
37
37
  externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-css-tagged-template-expression/usage',
38
38
  recommended: true,
39
- severity: 'warn'
39
+ severity: 'error'
40
40
  }
41
41
  }, {
42
42
  name: '@atlaskit/design-system/no-keyframes-tagged-template-expression',
@@ -48,7 +48,7 @@ var externalRules = exports.externalRules = [{
48
48
  url: (0, _createRule.getRuleUrl)('no-keyframes-tagged-template-expression'),
49
49
  externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-keyframes-tagged-template-expression/usage',
50
50
  recommended: true,
51
- severity: 'warn'
51
+ severity: 'error'
52
52
  }
53
53
  }, {
54
54
  name: '@atlaskit/design-system/no-styled-tagged-template-expression',
@@ -60,7 +60,7 @@ var externalRules = exports.externalRules = [{
60
60
  url: (0, _createRule.getRuleUrl)('no-styled-tagged-template-expression'),
61
61
  externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-styled-tagged-template-expression/usage',
62
62
  recommended: true,
63
- severity: 'warn'
63
+ severity: 'error'
64
64
  }
65
65
  }, {
66
66
  name: '@compiled/no-suppress-xcss',
@@ -71,7 +71,7 @@ var externalRules = exports.externalRules = [{
71
71
  url: (0, _createRule.getRuleUrl)('no-suppress-xcss'),
72
72
  externalUrl: 'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-suppress-xcss',
73
73
  recommended: true,
74
- severity: 'warn'
74
+ severity: 'error'
75
75
  }
76
76
  }, {
77
77
  name: '@compiled/no-js-xcss',
@@ -82,7 +82,7 @@ var externalRules = exports.externalRules = [{
82
82
  url: (0, _createRule.getRuleUrl)('no-js-xcss'),
83
83
  externalUrl: 'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-js-xcss',
84
84
  recommended: true,
85
- severity: 'warn'
85
+ severity: 'error'
86
86
  }
87
87
  }, {
88
88
  name: '@atlaskit/design-system/no-empty-styled-expression',
@@ -93,7 +93,7 @@ var externalRules = exports.externalRules = [{
93
93
  url: (0, _createRule.getRuleUrl)('no-empty-styled-expression'),
94
94
  externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-empty-styled-expression/usage',
95
95
  recommended: true,
96
- severity: 'warn',
96
+ severity: 'error',
97
97
  pluginConfig: {
98
98
  importSources: importSources
99
99
  }
@@ -107,7 +107,7 @@ var externalRules = exports.externalRules = [{
107
107
  url: (0, _createRule.getRuleUrl)('no-exported-css'),
108
108
  externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-exported-css/usage',
109
109
  recommended: true,
110
- severity: 'warn',
110
+ severity: 'error',
111
111
  pluginConfig: {
112
112
  importSources: importSources
113
113
  }
@@ -121,7 +121,7 @@ var externalRules = exports.externalRules = [{
121
121
  url: (0, _createRule.getRuleUrl)('no-exported-keyframes'),
122
122
  externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-exported-keyframes/usage',
123
123
  recommended: true,
124
- severity: 'warn',
124
+ severity: 'error',
125
125
  pluginConfig: {
126
126
  importSources: importSources
127
127
  }
@@ -135,7 +135,7 @@ var externalRules = exports.externalRules = [{
135
135
  url: (0, _createRule.getRuleUrl)('no-invalid-css-map'),
136
136
  externalUrl: 'https://atlassian.design/components/eslint-plugin-design-system/no-invalid-css-map/usage',
137
137
  recommended: true,
138
- severity: 'warn',
138
+ severity: 'error',
139
139
  pluginConfig: {
140
140
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
141
141
  }
@@ -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: 'warn'
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: 'warn'
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: 'warn'
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: 'warn'
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.'
@@ -29,7 +29,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
29
29
  docs: {
30
30
  description: 'Disallows use of dynamic styles in CSS-in-JS calls',
31
31
  recommended: true,
32
- severity: 'warn'
32
+ severity: 'error'
33
33
  },
34
34
  schema: schema,
35
35
  messages: {
@@ -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: 'warn'
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: 'warn'
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: 'warn'
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.'
@@ -57,7 +57,7 @@ var schema = [{
57
57
  var isIdentifierImported = function isIdentifierImported(identifier, context, functionAllowList, keysAllowList) {
58
58
  var variable = (0, _findVariable.findVariable)({
59
59
  identifier: identifier,
60
- sourceCode: context.sourceCode
60
+ sourceCode: context.getSourceCode()
61
61
  });
62
62
  if (!variable) {
63
63
  return false;
@@ -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: 'warn'
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: 'warn'
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: 'warn'
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: 'warn'
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: 'warn'
58
+ severity: 'error'
59
59
  },
60
60
  messages: _messages.messages,
61
61
  type: 'problem',
@@ -71,7 +71,7 @@ var Linter = exports.Linter = /*#__PURE__*/function () {
71
71
  }
72
72
  var variable = (0, _findVariable.findVariable)({
73
73
  identifier: value,
74
- sourceCode: this.context.sourceCode
74
+ sourceCode: this.context.getSourceCode()
75
75
  });
76
76
  if (!variable) {
77
77
  this.lintUnhandledIdentifier(value);
@@ -172,7 +172,7 @@ var Linter = exports.Linter = /*#__PURE__*/function () {
172
172
  }
173
173
  var variable = (0, _findVariable.findVariable)({
174
174
  identifier: identifier,
175
- sourceCode: this.context.sourceCode
175
+ sourceCode: this.context.getSourceCode()
176
176
  });
177
177
  if (!variable) {
178
178
  return false;
@@ -215,7 +215,7 @@ var Linter = exports.Linter = /*#__PURE__*/function () {
215
215
  }
216
216
  var variable = (0, _findVariable.findVariable)({
217
217
  identifier: identifier,
218
- sourceCode: this.context.sourceCode
218
+ sourceCode: this.context.getSourceCode()
219
219
  });
220
220
  if (!variable) {
221
221
  return false;
@@ -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: 'warn'
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::f240d1cd5b93827327b66c28ad47e698>>
3
+ * @codegen <<SignedSource::aa1d9d67dc9b6b0488df0b31ff142f30>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -8,39 +8,39 @@ 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': 'warn',
12
- '@atlaskit/ui-styling-standard/local-cx-xcss': 'warn',
13
- '@atlaskit/ui-styling-standard/no-array-arguments': 'warn',
14
- '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
15
- '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
- '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
- '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
- '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
19
- '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
20
- '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
21
- '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
- '@atlaskit/ui-styling-standard/no-styled': 'warn',
23
- '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'warn',
24
- '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
25
- '@atlaskit/ui-styling-standard/use-compiled': 'warn',
26
- '@atlaskit/design-system/consistent-css-prop-usage': ['warn', {
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
27
  excludeReactComponents: true
28
28
  }],
29
- '@atlaskit/design-system/no-css-tagged-template-expression': 'warn',
30
- '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'warn',
31
- '@atlaskit/design-system/no-styled-tagged-template-expression': 'warn',
32
- '@compiled/no-suppress-xcss': 'warn',
33
- '@compiled/no-js-xcss': 'warn',
34
- '@atlaskit/design-system/no-empty-styled-expression': ['warn', {
29
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
30
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
31
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
32
+ '@compiled/no-suppress-xcss': 'error',
33
+ '@compiled/no-js-xcss': 'error',
34
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
35
35
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
36
36
  }],
37
- '@atlaskit/design-system/no-exported-css': ['warn', {
37
+ '@atlaskit/design-system/no-exported-css': ['error', {
38
38
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
39
39
  }],
40
- '@atlaskit/design-system/no-exported-keyframes': ['warn', {
40
+ '@atlaskit/design-system/no-exported-keyframes': ['error', {
41
41
  importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
42
42
  }],
43
- '@atlaskit/design-system/no-invalid-css-map': ['warn', {
43
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
44
44
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
45
45
  }]
46
46
  }