Skip to content

refactor: upgrade ESLint and migrate its plugins to v9 #3456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

86 changes: 0 additions & 86 deletions .eslintrc

This file was deleted.

12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/website"
interval: 'daily'
- package-ecosystem: 'npm'
directory: '/website'
schedule:
interval: "daily"
interval: 'daily'
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Benchmark
on:
pull_request:
push:
branches: [ main ]
branches: [main]

workflow_dispatch:

Expand All @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
node-version: [22]
mysql-version: ["mysql:8.0.18"]
mysql-version: ['mysql:8.0.18']
use-compression: [0]
use-tls: [0]

Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
# run: node tools/wait-up.js

- name: Run benchmark
run: node benchmarks/benchmark.js | tee output.txt
run: node benchmarks/benchmark.js | tee output.txt

- name: Download previous benchmark data
uses: actions/cache@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
fail-fast: false
matrix:
node-version: [22]
mysql-version:
[
mysql-version: [
# 'mysql:5.7', # Already tested in "ci-coverage"
# 'mysql:8.0', # Already tested in "ci-coverage"
'mysql:8.1',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI - OSX
on:
pull_request:
push:
branches: [ main ]
branches: [main]

workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-tsc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI - TypeScript Build
on:
pull_request:
push:
branches: [ main ]
branches: [main]

workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI - Windows
on:
pull_request:
push:
branches: [ main ]
branches: [main]

workflow_dispatch:

Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '17 2 * * 3'

Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
15 changes: 3 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: lint
on:
pull_request:
push:
branches: [ master ]
branches: [master]
workflow_dispatch:

env:
Expand All @@ -29,14 +29,5 @@ jobs:
- name: Install ESLint + ESLint configs/plugins
run: npm install --only=dev

- name: Lint JS files
run: npm run lint:code

- name: Lint JS snippets in docs
run: npm run lint:docs

- name: Lint Tests
run: npm run lint:tests

- name: Lint Typings
run: npm run lint:typings
- name: Lint
run: npm run lint
6 changes: 2 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
website/build
website/.docusaurus
website/.cache-loader
website/**/*.mdx
website/
Changelog.md
15 changes: 14 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{
"printWidth": 80,
"singleQuote": true
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto",
"singleAttributePerLine": false
}
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bench-fake-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function benchmarkSelect(numLeft, callback) {
function benchmarkSelects(n, cb) {
const numSelects = 100000;
const start = process.hrtime();
benchmarkSelect(numSelects, rowsPerQuery => {
benchmarkSelect(numSelects, (rowsPerQuery) => {
const end = process.hrtime();
const diff = common.hrdiff(start, end);
console.log(
Expand All @@ -46,7 +46,7 @@ function benchmarkSelects(n, cb) {
});
}

module.exports = function(done) {
module.exports = function (done) {
const testStart = process.hrtime();
benchmarkSelects(5, () => {
const testEnd = process.hrtime();
Expand Down
Loading
Loading