Skip to content

Commit

Permalink
ci: fix linting
Browse files Browse the repository at this point in the history
include typescript, add some rules. Some of them should be enabled later.
  • Loading branch information
tuner committed May 3, 2024
1 parent 3389e5c commit 4212fd4
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
14 changes: 13 additions & 1 deletion .eslintrc.js
@@ -1,9 +1,17 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
env: {
browser: true,
es6: true,
},
extends: ["eslint:recommended", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
Expand All @@ -20,5 +28,9 @@ module.exports = {
"dot-notation": "off",
"no-unused-vars": ["error", { args: "none" }],
"require-await": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
},
};
13 changes: 9 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -8,8 +8,10 @@
"@commitlint/cli": "^16.2.4",
"@commitlint/config-conventional": "^16.2.4",
"@rollup/plugin-replace": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"dependency-cruiser": "^15.3.0",
"eslint": "^8.23.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.5.0",
"express": "^4.17.2",
"husky": "^8.0.1",
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/utils/crc32.js
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable global-require */
/*
* Adapted from: https://stackoverflow.com/a/18639999/1547896
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/spec/axis.d.ts
Expand Up @@ -135,9 +135,7 @@ export interface Axis extends BaseAxis {

export interface BaseAxis<
N = number,
NS = number,
B = boolean,
BNS = number | boolean,
S = string,
C = string,
FW = string,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/spec/scale.d.ts
Expand Up @@ -130,7 +130,7 @@ export interface Scale {
round?: boolean;

/**
* For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.
* For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.
*
* For _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.
*
Expand Down

0 comments on commit 4212fd4

Please sign in to comment.