2024-02-27 09:59:20 -05:00
|
|
|
/* eslint-disable import/no-commonjs */
|
|
|
|
|
2023-11-28 09:09:21 -05:00
|
|
|
// @ts-check
|
2024-02-27 09:59:20 -05:00
|
|
|
|
|
|
|
// @ts-ignore - This needs to be a CJS file (eslint does not yet support ESM configs), and TS is complaining we use require
|
2023-11-28 09:09:21 -05:00
|
|
|
const { defineConfig } = require('eslint-define-config');
|
|
|
|
|
|
|
|
module.exports = defineConfig({
|
|
|
|
extends: ['../.eslintrc.js'],
|
|
|
|
env: {
|
|
|
|
browser: false,
|
|
|
|
},
|
|
|
|
parserOptions: {
|
|
|
|
project: true,
|
|
|
|
tsconfigRootDir: __dirname,
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: false,
|
|
|
|
},
|
|
|
|
ecmaVersion: 2021,
|
|
|
|
},
|
|
|
|
rules: {
|
2024-01-18 13:40:25 -05:00
|
|
|
// In the streaming server we need to delete some variables to ensure
|
|
|
|
// garbage collection takes place on the values referenced by those objects;
|
|
|
|
// The alternative is to declare the variable as nullable, but then we need
|
|
|
|
// to assert it's in existence before every use, which becomes much harder
|
|
|
|
// to maintain.
|
|
|
|
'no-delete-var': 'off',
|
|
|
|
|
|
|
|
// This overrides the base configuration for this rule to pick up
|
|
|
|
// dependencies for the streaming server from the correct package.json file.
|
2023-11-28 09:09:21 -05:00
|
|
|
'import/no-extraneous-dependencies': [
|
|
|
|
'error',
|
|
|
|
{
|
2024-02-27 09:59:20 -05:00
|
|
|
devDependencies: ['streaming/.eslintrc.cjs'],
|
2023-11-28 09:09:21 -05:00
|
|
|
optionalDependencies: false,
|
|
|
|
peerDependencies: false,
|
|
|
|
includeTypes: true,
|
|
|
|
packageDir: __dirname,
|
|
|
|
},
|
|
|
|
],
|
2024-02-27 09:59:20 -05:00
|
|
|
'import/extensions': ['error', 'always'],
|
2023-11-28 09:09:21 -05:00
|
|
|
},
|
|
|
|
});
|