javascript
javascript copied to clipboard
feat!: use ecmaVersion latest
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.
related: https://github.com/eslint/create-config/issues/51