Skip to content

Commit

Permalink
fix(eslint-config-bod): rectify incorrect es6 globals (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi authored Apr 1, 2024
1 parent 59673e2 commit cd35e76
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 25 deletions.
1 change: 1 addition & 0 deletions packages/eslint-config-bod/advanced.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const restrictedGlobals = require('confusing-browser-globals')
const eslintPluginImport = require('eslint-plugin-import-x')
const eslintPluginJsxA11y = require('eslint-plugin-jsx-a11y')
Expand Down
12 changes: 3 additions & 9 deletions packages/eslint-config-bod/basic.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// @ts-check
// This file contains the minimum ESLint configuration required for Create
// React App support, and is used as the `baseConfig` for `eslint-loader`
// React App support, and is used as the `basicConfig` for `eslint-loader`
// to ensure that user-provided configs don't need this boilerplate.

const globals = require('globals')
Expand Down Expand Up @@ -64,7 +58,7 @@ module.exports = [
globals: {
...globals.browser,
...globals.commonjs,
...globals.es6,
...globals.es2015,
...globals.jest,
...globals.node,
},
Expand Down
10 changes: 1 addition & 9 deletions packages/eslint-config-bod/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// Inspired by https://github.com/airbnb/javascript but less opinionated.

// @ts-check
// We use eslint-loader so even warnings are very visible.
// This is why we prefer to use "WARNING" level for potential errors,
// and we try not to use "ERROR" level at all.
Expand Down
8 changes: 1 addition & 7 deletions packages/eslint-config-bod/jest.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// @ts-check
// We use eslint-loader so even warnings are very visible.
// This is why we prefer to use "WARNING" level for potential errors,
// and we try not to use "ERROR" level at all.
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-bod/typescript.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const tseslint = require('typescript-eslint')

/** @type {import('eslint').Linter.FlatConfig} */
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import antfu, { GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_TS, GLOB_TSX } from '@antfu/eslint-config'
Expand Down

0 comments on commit cd35e76

Please sign in to comment.