@cubejs-backend/linter 1.7.37 → 1.7.38

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 (2) hide show
  1. package/node.json +31 -0
  2. package/package.json +4 -3
package/node.json ADDED
@@ -0,0 +1,31 @@
1
+ // The Node preset: Cube's shared oxlint configuration plus what only applies to the
2
+ // backend packages. Frontend packages (@cubejs-client/*) extend the repo-root config or
3
+ // airbnb-react.json instead, so nothing here reaches them.
4
+ {
5
+ "$schema": "../../node_modules/oxlint/configuration_schema.json",
6
+ "extends": ["./.oxlintrc.json"],
7
+ "rules": {
8
+ // A control-flow block that opens right under an unrelated statement reads as part of
9
+ // it. Backend code is dense with them -- driver retry loops, connection teardown --
10
+ // so require the separating blank line. `for` covers for/for-in/for-of, `do` covers
11
+ // do/while; a plain `while` is left alone because its condition sits on the keyword
12
+ // line and already reads as its own statement.
13
+ "@stylistic/padding-line-between-statements": [
14
+ "warn",
15
+ { "blankLine": "always", "prev": "*", "next": ["try", "do", "for"] }
16
+ ]
17
+ },
18
+ "overrides": [
19
+ {
20
+ // A top-level `env` key is not inherited through `extends` -- oxlint treats it as
21
+ // per-config-file -- but an `overrides` entry's `env` is. Declaring the Node
22
+ // environment this way is what lets the backend packages extend this preset and get
23
+ // it, instead of each restating `{ "node": true, "es6": true }`.
24
+ "files": ["**"],
25
+ "env": {
26
+ "node": true,
27
+ "es6": true
28
+ }
29
+ }
30
+ ]
31
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@cubejs-backend/linter",
3
- "description": "Cube.js shared oxlint configuration (virtual package) for linting code",
3
+ "description": "Cube shared oxlint configuration (virtual package) for linting code",
4
4
  "author": "Cube Dev, Inc.",
5
- "version": "1.7.37",
5
+ "version": "1.7.38",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/cube-js/cube.git",
@@ -17,6 +17,7 @@
17
17
  },
18
18
  "files": [
19
19
  ".oxlintrc.json",
20
+ "node.json",
20
21
  "airbnb-base.json",
21
22
  "airbnb-react.json"
22
23
  ],
@@ -24,5 +25,5 @@
24
25
  "publishConfig": {
25
26
  "access": "public"
26
27
  },
27
- "gitHead": "28c8efd405d900a1b9cb6cb5ebc2ec951aa375be"
28
+ "gitHead": "9ea1fda5dade5b8a4256acd20bcf77318fe13a72"
28
29
  }