web-infra-dev / rsdoctor

A one-stop build analyzer for Rspack and webpack.
https://rsdoctor.dev/
MIT License
456 stars 38 forks source link

[Feature]: optimize the ecma version check. #532

Open easy1090 opened 2 months ago

easy1090 commented 2 months ago

What problem does this feature solve?

  1. Support users in configuring the version number for ECMAScript testing.
  2. Support for ecma version 8.

What does the proposed API look like?


linter: {
        rules: {
          'ecma-version-check': [
            'Error',
            {
              checkVersion: 7, // enum, 6 | 7 | 8
              exclude: [] // exclude some files. 
            },
          ],
        },
    }
nyqykk commented 4 days ago

checkVersion maybe better changed to ES2015 and so on

chenjiahan commented 4 days ago

@nyqykk How about align options with rsbuild-plugin-check-syntax:

https://github.com/rspack-contrib/rsbuild-plugin-check-syntax?tab=readme-ov-file#options

nyqykk commented 4 days ago

Good suggestion

@nyqykk How about align options with rsbuild-plugin-check-syntax:

https://github.com/rspack-contrib/rsbuild-plugin-check-syntax?tab=readme-ov-file#options