In previous applications, I have used .eslintrc
as the depository for my instructions to ESLint. But now I have to use eslint.config.mjs
instead.
This is the .eslintrc
configuration I used to use:
module.exports = {
extends: ['@gdp/eslint-config-base', 'airbnb-base'],
env: {
node: true,
},
rules: {
'no-plusplus': 'off',
},
parserOptions: {
ecmaVersion: 2020,
},
};
and this is my eslint.config.mjs
file as it currently stands:
import globals from "globals";
import pluginJs from "@eslint/js";
import jest from "eslint-plugin-jest"
export default [
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
{files: ["test/**"], ...jest.configs['flat/recommended'],},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
];
How do I pull airbnb-base
into the file? I have eslint-config-airbnb-base
in my dependencies.