mirror of https://github.com/mastodon/mastodon
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
10 months ago
|
/* eslint-disable import/no-commonjs */
|
||
|
|
||
1 year ago
|
// @ts-check
|
||
10 months ago
|
|
||
|
// @ts-ignore - This needs to be a CJS file (eslint does not yet support ESM configs), and TS is complaining we use require
|
||
1 year ago
|
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: {
|
||
11 months ago
|
// 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.
|
||
1 year ago
|
'import/no-extraneous-dependencies': [
|
||
|
'error',
|
||
|
{
|
||
10 months ago
|
devDependencies: ['streaming/.eslintrc.cjs'],
|
||
1 year ago
|
optionalDependencies: false,
|
||
|
peerDependencies: false,
|
||
|
includeTypes: true,
|
||
|
packageDir: __dirname,
|
||
|
},
|
||
|
],
|
||
10 months ago
|
'import/extensions': ['error', 'always'],
|
||
1 year ago
|
},
|
||
|
});
|