javascript icon indicating copy to clipboard operation
javascript copied to clipboard

feat!: use ecmaVersion latest

Open aladdin-add opened this issue 1 year ago • 1 comments

The following code is often used when using @eslint/eslintrc with eslint-config-airbnb-base:

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended});

However, import.meta is not supported in ecmaVersion: '2018'. This change allows users to be able to use it that way.

aladdin-add avatar Apr 10 '24 12:04 aladdin-add

related: https://github.com/eslint/create-config/issues/51

aladdin-add avatar Apr 10 '24 12:04 aladdin-add