mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 20:29:23 +01:00
7e6d92c485
Closes: https://github.com/nodejs/node/issues/52567 PR-URL: https://github.com/nodejs/node/pull/52780 Fixes: https://github.com/nodejs/node/issues/52567 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
41 lines
892 B
JavaScript
41 lines
892 B
JavaScript
import { requireEslintTool } from '../tools/eslint.config_utils.mjs';
|
|
|
|
const globals = requireEslintTool('globals');
|
|
|
|
export default [
|
|
{
|
|
files: ['doc/**/*.md/*.{js,mjs,cjs}'],
|
|
rules: {
|
|
// Ease some restrictions in doc examples.
|
|
'no-restricted-properties': 'off',
|
|
'no-undef': 'off',
|
|
'no-unused-expressions': 'off',
|
|
'no-unused-vars': 'off',
|
|
'symbol-description': 'off',
|
|
|
|
// Add new ECMAScript features gradually.
|
|
'prefer-const': 'error',
|
|
'prefer-rest-params': 'error',
|
|
'prefer-template': 'error',
|
|
|
|
// Stylistic rules.
|
|
'@stylistic/js/no-multiple-empty-lines': [
|
|
'error',
|
|
{
|
|
max: 1,
|
|
maxEOF: 0,
|
|
maxBOF: 0,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: ['doc/api_assets/*.js'],
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
},
|
|
},
|
|
];
|