Skip to content
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

feat: avoid @typescript-eslint/typescript-estree warning message (#69) #70

Merged
merged 3 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
version: '14, 16, 18'
version: '16, 18, 20'
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ npm i eslint eslint-config-egg --save-dev
```json
{
"devDependencies": {
"eslint-config-egg": "12",
"eslint-config-egg": "13",
"eslint": "8"
}
}
Expand All @@ -53,7 +53,7 @@ module.exports = {
```json
{
"devDependencies": {
"eslint-config-egg": "12",
"eslint-config-egg": "13",
"typescript": "^4.5.2"
}
}
Expand Down Expand Up @@ -105,7 +105,7 @@ If you want to use eslint-config-egg with experimental features such as `async f
```json
{
"devDependencies": {
"eslint-config-egg": "12",
"eslint-config-egg": "13",
"eslint": "8",
"@babel/core": "7",
"@babel/eslint-parser": "7"
Expand Down Expand Up @@ -137,7 +137,7 @@ If you want to use eslint-config-egg with react, jsx and es6 modules:
```json
{
"devDependencies": {
"eslint-config-egg": "12",
"eslint-config-egg": "13",
"eslint": "8",
"@babel/core": "7",
"@babel/eslint-parser": "7",
Expand Down
2 changes: 0 additions & 2 deletions lib/legacy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

module.exports = {
extends: [
'./rules/best-practices',
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"dependencies": {
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.3",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些都不支持 node 14 了
https://github.com/typescript-eslint/typescript-eslint/blob/main/package.json#L53

"engines": {
    "node": "^16.0.0 || >=18.0.0"
  },

"eslint-plugin-eggache": "^2.0.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^39.3.0",
Expand All @@ -29,7 +29,7 @@
"egg-bin": "6",
"eslint": "^8.3.0",
"git-contributor": "2",
"typescript": "^4.5.2"
"typescript": "^5.2.2"
},
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/ts-app/constructor/correct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ export class MyClass {
constructor(
public a: number,
public b: string,
) {}
) {
// ignore
}
}
4 changes: 1 addition & 3 deletions test/ts.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const path = require('path');
const coffee = require('coffee');

Expand Down Expand Up @@ -163,7 +161,7 @@ describe('test/ts.test.js', () => {
describe('no-useless-constructor', () => {
it('should success', () => {
return coffee.spawn('eslint', [ './constructor/correct.ts' ], { cwd })
// .debug()
.debug()
.expect('code', 0)
.end();
});
Expand Down
2 changes: 0 additions & 2 deletions typescript.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

module.exports = {
parser: '@typescript-eslint/parser',
plugins: [ '@typescript-eslint' ],
Expand Down