optuna / optuna-dashboard

Real-time Web Dashboard for Optuna.
https://optuna-dashboard.readthedocs.io/en/latest/
Other
477 stars 83 forks source link

Make biome-linter ignore ts files in `optuna_dashboard` #866

Closed porink0424 closed 3 months ago

porink0424 commented 3 months ago

Contributor License Agreement

This repository (optuna-dashboard) and Goptuna share common code. This pull request may therefore be ported to Goptuna. Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.

Reference Issues/PRs

NA

What does this implement/fix? Explain your changes.

TS files in optuna_dashboard used to be double checked by biome-linter and eslint. I made an update that makes biome-linter ignore those files so that only eslint checks them.

Also, in the script npm run fmt, I added organizeImport into optuna_dashboard.

c-bata commented 3 months ago

@porink0424 Could you fix the following error?

$ npm run lint

> lint
> npm run lint:eslint && npm run lint:biome

> lint:eslint
> eslint . --ext .ts,.tsx --max-warnings 0

=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0

YOUR TYPESCRIPT VERSION: 5.4.2

Please only submit bug reports when using the officially supported version.

=============

> lint:biome
> biome format . && biome ci .

./biome.json format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Formatter would have printed the following content:

    21 21 │     },
    22 22 │     "linter": {
    23    │ - → → "ignore":·[
    24    │ - → → → "optuna_dashboard/ts/**/*.ts",
    25    │ - → → → "optuna_dashboard/ts/**/*.tsx"
    26    │ - → → ]
       23 │ + → → "ignore":·["optuna_dashboard/ts/**/*.ts",·"optuna_dashboard/ts/**/*.tsx"]
    27 24 │     },
    28 25 │     "javascript": {

Checked 99 files in 1129ms. No fixes needed.
Found 1 error.
format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Some errors were emitted while running checks.