@wistia/eslint-config 0.2.6 → 0.3.2

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/.tool-versions ADDED
@@ -0,0 +1,3 @@
1
+ ruby 2.7.5
2
+ nodejs 16.10.0
3
+ yarn 1.22.10
@@ -0,0 +1,17 @@
1
+ # this is a catalog entity descriptor file for our Backstage instance (https://backstage.wistia.cloud)
2
+
3
+ apiVersion: backstage.io/v1alpha1
4
+ kind: Component
5
+ metadata:
6
+ name: ESLint-Config
7
+ description: Wistia's ESLint configurations
8
+ annotations:
9
+ github.com/project-slug: wistia/eslint-config
10
+ backstage.io/techdocs-ref: dir:.
11
+ tags:
12
+ - lang#javascript
13
+ - pkg#npm
14
+ spec:
15
+ type: configuration
16
+ owner: app-platform
17
+ lifecycle: production
package/mkdocs.yaml ADDED
@@ -0,0 +1,10 @@
1
+ # this file exists to generate techdocs for Backstage (https://backstage.wistia.cloud)
2
+
3
+ site_name: ESLint-Config
4
+ docs_dir: .
5
+ plugins:
6
+ - techdocs-core
7
+ - same-dir
8
+ - exclude:
9
+ glob:
10
+ - node_modules/*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/eslint-config",
3
- "version": "0.2.6",
3
+ "version": "0.3.2",
4
4
  "description": "Wistia's ESLint configurations",
5
5
  "main": "react.js",
6
6
  "scripts": {
@@ -9,34 +9,37 @@
9
9
  "test": "echo \"Error: no test specified\" && exit 1"
10
10
  },
11
11
  "dependencies": {
12
- "@babel/core": "^7.16.0",
13
- "@babel/eslint-parser": "^7.16.3",
14
- "eslint": "^8.2.0",
15
- "eslint-config-airbnb": "^19.0.0",
16
- "eslint-config-prettier": "^8.3.0",
12
+ "@babel/core": "^7.17.7",
13
+ "@babel/eslint-parser": "^7.17.0",
14
+ "eslint": "^8.11.0",
15
+ "eslint-config-airbnb": "^19.0.4",
16
+ "eslint-config-prettier": "^8.5.0",
17
17
  "eslint-plugin-better-styled-components": "^1.1.2",
18
- "eslint-plugin-import": "^2.25.3",
19
- "eslint-plugin-jest": "^25.2.4",
18
+ "eslint-plugin-import": "^2.25.4",
19
+ "eslint-plugin-jest": "^26.1.1",
20
20
  "eslint-plugin-jest-dom": "^4.0.1",
21
- "eslint-plugin-jest-formatting": "^3.0.0",
21
+ "eslint-plugin-jest-formatting": "^3.1.0",
22
22
  "eslint-plugin-jsx-a11y": "^6.5.1",
23
23
  "eslint-plugin-prettier": "^4.0.0",
24
- "eslint-plugin-react": "^7.27.0",
24
+ "eslint-plugin-react": "^7.29.4",
25
25
  "eslint-plugin-react-hooks": "^4.3.0",
26
26
  "eslint-plugin-styled-components-a11y": "^0.0.34",
27
- "eslint-plugin-testing-library": "^5.0.0",
28
- "prettier": "^2.4.1",
29
- "stylelint": "^13.0.0",
30
- "stylelint-config-prettier": "^9.0.0",
31
- "stylelint-config-standard": "^22.0.0",
32
- "stylelint-declaration-block-no-ignored-properties": "^2.0.0",
33
- "stylelint-prettier": "^1.0.0",
27
+ "eslint-plugin-testing-library": "^5.1.0",
28
+ "postcss": "^8.4.12",
29
+ "postcss-scss": "^4.0.3",
30
+ "prettier": "^2.6.0",
31
+ "stylelint": "^14.6.0",
32
+ "stylelint-config-prettier": "^9.0.3",
33
+ "stylelint-config-standard": "^25.0.0",
34
+ "stylelint-config-standard-scss": "^3.0.0",
35
+ "stylelint-declaration-block-no-ignored-properties": "^2.5.0",
36
+ "stylelint-prettier": "^2.0.0",
34
37
  "stylelint-processor-styled-components": "^1.10.0"
35
38
  },
36
39
  "devDependencies": {
37
- "@commitlint/cli": "^16.0.1",
38
- "@commitlint/config-conventional": "^16.0.0",
39
- "husky": "^7.0.1"
40
+ "@commitlint/cli": "^16.2.3",
41
+ "@commitlint/config-conventional": "^16.2.1",
42
+ "husky": "^7.0.4"
40
43
  },
41
44
  "engines": {
42
45
  "node": "^10.12.0 || >=12.0.0"
@@ -3,8 +3,9 @@ const styledComponentRules = require('../stylelintRules/styled-components');
3
3
 
4
4
  module.exports = {
5
5
  plugins: ['stylelint-prettier', 'stylelint-declaration-block-no-ignored-properties'],
6
+ extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier'],
7
+ customSyntax: 'postcss-scss',
6
8
  processors: ['stylelint-processor-styled-components'],
7
- extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
8
9
  rules: {
9
10
  ...commonRules,
10
11
  ...styledComponentRules,
@@ -1,14 +1,25 @@
1
1
  // only add rules pertaining to styled-components
2
2
 
3
3
  module.exports = {
4
+ // in css-in-js when variables are being passed around, this rule
5
+ // often leads to less readable code, even though it is more compact
6
+ 'declaration-block-no-redundant-longhand-properties': null,
7
+ // this appears to conflict with styled-components keyframes method
8
+ 'keyframes-name-pattern': null,
4
9
  // without this pretty much every file will throw an error¯\_(ツ)_/¯
5
10
  'no-empty-source': null,
6
11
  // disallow property values that are ignored due to another property value in the same rule
7
12
  'plugin/declaration-block-no-ignored-properties': true,
13
+ // prevent snake case from being used for class/id selectors but be otherwise flexible
14
+ 'selector-class-pattern': '^[a-zA-Z0-9-]+(-[a-zA-Z0-9]+)*$',
15
+ 'selector-id-pattern': '^[a-zA-Z0-9-]+(-[a-zA-Z0-9]+)*$',
8
16
  // these selectors are used as placeholders by styled-components preprocessor
9
17
  'selector-type-no-unknown': [true, { ignoreTypes: ['$dummyValue', '/^-styled-/'] }],
10
18
  'value-keyword-case': [
11
19
  'lower',
12
20
  { ignoreKeywords: [/dummyValue/], ignoreProperties: [/dummyValue/] },
13
21
  ],
22
+ // styled-components adds vendor prefixes if necessary so we should avoid adding them in code
23
+ 'value-no-vendor-prefix': true,
24
+ 'property-no-vendor-prefix': true,
14
25
  };