mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
Remove eslint-plugin-prettier (#16823)
Co-authored-by: Nicolò Ribaudo <[email protected]> Co-authored-by: liuxingbaoyu <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Nicolò Ribaudo
liuxingbaoyu
parent
5c2f2d7769
commit
a7f84c028e
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"all": true,
|
||||
"reporter":["lcov", "text"],
|
||||
"reporter": ["lcov", "text"],
|
||||
"include": [
|
||||
"packages/*/lib/**/*.{js,cjs,mjs,ts}",
|
||||
"codemods/*/lib/**/*.{js,cjs,mjs,ts}",
|
||||
"eslint/*/lib/**/*.{js,cjs,mjs,ts}"
|
||||
],
|
||||
"exclude":[
|
||||
"exclude": [
|
||||
"packages/babel-standalone/**",
|
||||
"packages/babel-types/**/generated/*",
|
||||
"packages/babel-helpers/*/helpers/*",
|
||||
|
||||
+21
-4
@@ -2,12 +2,29 @@ package.json
|
||||
packages/babel-preset-env/data
|
||||
packages/babel-compat-data/data
|
||||
packages/babel-compat-data/scripts/data/overlapping-plugins.js
|
||||
packages/babel-core/src/vendor
|
||||
packages/*/test/fixtures/**/input.*
|
||||
packages/*/test/fixtures/**/exec.*
|
||||
packages/*/test/fixtures/**/output.*
|
||||
packages/babel-core/src/vendor/**
|
||||
**/test/fixtures/**
|
||||
packages/babel-standalone/examples/**
|
||||
packages/babel-parser/test/expressions/**
|
||||
scripts/integration-tests/fixtures/**
|
||||
packages/babel-parser/test/schema.json
|
||||
test/runtime-integration/node.cjs
|
||||
|
||||
CHANGELOG.md
|
||||
.github/*.md
|
||||
.yarn/releases/*
|
||||
|
||||
# Generated
|
||||
lib/archived-libs.d.ts
|
||||
packages/babel-parser/typings/babel-parser.d.ts
|
||||
Makefile.js
|
||||
packages/babel-runtime-corejs2/helpers/**
|
||||
packages/babel-runtime-corejs2/core-js/**
|
||||
packages/babel-runtime-corejs3/helpers/**
|
||||
packages/babel-runtime/helpers/**
|
||||
**/tsconfig.json
|
||||
**/tsconfig.*.json
|
||||
|
||||
# Should enable?
|
||||
**/*.yml
|
||||
**/*.md
|
||||
|
||||
Vendored
+10
-2
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"eslint.experimental.useFlatConfig": true,
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": [
|
||||
@@ -19,5 +18,14 @@
|
||||
"!${workspaceFolder}/packages/*/test/**",
|
||||
"!**/node_modules/**"
|
||||
]
|
||||
}
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": ["source.fixAll.eslint"]
|
||||
},
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"prettier.requireConfig": true
|
||||
}
|
||||
|
||||
+1
-1
@@ -650,7 +650,7 @@ function buildRollupDts(packages) {
|
||||
"packages/babel-parser/typings/babel-parser.d.ts",
|
||||
"// This file is auto-generated! Do not modify it directly.\n" +
|
||||
// @typescript-eslint/no-redundant-type-constituents can be removed once we drop the IF_BABEL_7 type
|
||||
"/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents, prettier/prettier */",
|
||||
"/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */",
|
||||
"packages/babel-parser"
|
||||
)
|
||||
);
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+9
-9
@@ -409,17 +409,23 @@ function eslint(...extraArgs) {
|
||||
target["lint"] = function () {
|
||||
env(() => target["tscheck"](), { TSCHECK_SILENT: "true" });
|
||||
eslint();
|
||||
target["lint-prettier"]();
|
||||
};
|
||||
|
||||
target["lint-ci"] = function () {
|
||||
target["tscheck"]();
|
||||
eslint();
|
||||
target["lint-prettier"]();
|
||||
target["prepublish-prepare-dts-no-clean"]();
|
||||
};
|
||||
|
||||
target["lint-prettier"] = function () {
|
||||
yarn(["prettier", ".", "--check"]);
|
||||
};
|
||||
|
||||
target["fix"] = function () {
|
||||
target["fix-json"]();
|
||||
target["fix-js"]();
|
||||
target["fix-prettier"]();
|
||||
};
|
||||
|
||||
target["fix-js"] = function () {
|
||||
@@ -427,14 +433,8 @@ target["fix-js"] = function () {
|
||||
eslint("--fix");
|
||||
};
|
||||
|
||||
target["fix-json"] = function () {
|
||||
yarn([
|
||||
"prettier",
|
||||
`{${SOURCES.join(",")}}/*/test/fixtures/**/options.json`,
|
||||
"--write",
|
||||
"--loglevel",
|
||||
"warn",
|
||||
]);
|
||||
target["fix-prettier"] = function () {
|
||||
yarn(["prettier", ".", "--write"]);
|
||||
};
|
||||
|
||||
target["watch"] = function () {
|
||||
|
||||
+14
-19
@@ -1,25 +1,20 @@
|
||||
{
|
||||
"settings": {
|
||||
"rulers": [
|
||||
80
|
||||
],
|
||||
"settings": {
|
||||
"rulers": [80],
|
||||
|
||||
// Set to false to disable detection of tabs vs. spaces on load
|
||||
"detect_indentation": false,
|
||||
// Set to false to disable detection of tabs vs. spaces on load
|
||||
"detect_indentation": false,
|
||||
|
||||
"translate_tabs_to_spaces": true,
|
||||
"translate_tabs_to_spaces": true,
|
||||
|
||||
"tab_size": 2
|
||||
"tab_size": 2,
|
||||
},
|
||||
|
||||
"folders": [
|
||||
{
|
||||
"path": ".",
|
||||
"folder_exclude_patterns": ["packages/*/lib", "node_modules"],
|
||||
"file_exclude_patterns": [],
|
||||
},
|
||||
|
||||
"folders": [{
|
||||
"path": ".",
|
||||
"folder_exclude_patterns": [
|
||||
"packages/*/lib",
|
||||
"node_modules"
|
||||
],
|
||||
"file_exclude_patterns": [
|
||||
|
||||
]
|
||||
}]
|
||||
],
|
||||
}
|
||||
|
||||
+8
-3
@@ -7,7 +7,7 @@ import js from "@eslint/js";
|
||||
import pluginImport from "eslint-plugin-import";
|
||||
import pluginJest from "eslint-plugin-jest";
|
||||
import pluginN from "eslint-plugin-n";
|
||||
import pluginPrettier from "eslint-plugin-prettier";
|
||||
import configPrettier from "eslint-config-prettier";
|
||||
import pluginRegexp from "eslint-plugin-regexp";
|
||||
import pluginUnicorn from "eslint-plugin-unicorn";
|
||||
import pluginBabelDevelopment from "@babel/eslint-plugin-development";
|
||||
@@ -104,14 +104,12 @@ export default [
|
||||
plugins: {
|
||||
import: pluginImport,
|
||||
n: pluginN,
|
||||
prettier: pluginPrettier,
|
||||
unicorn: pluginUnicorn,
|
||||
"@babel/development": pluginBabelDevelopment,
|
||||
"@babel/development-internal": pluginBabelDevelopmentInternal,
|
||||
},
|
||||
rules: {
|
||||
"n/no-process-exit": "error",
|
||||
"prettier/prettier": "error",
|
||||
"import/no-extraneous-dependencies": "error",
|
||||
"regexp/match-any": ["error", { allows: ["[^]", "dotAll"] }],
|
||||
"unicorn/prefer-set-has": "error",
|
||||
@@ -219,6 +217,7 @@ export default [
|
||||
"@typescript-eslint/no-unsafe-function-type": "off",
|
||||
},
|
||||
}),
|
||||
configPrettier,
|
||||
{
|
||||
files: sourceFiles("js,ts,cjs,mjs"),
|
||||
languageOptions: {
|
||||
@@ -374,4 +373,10 @@ export default [
|
||||
"import/no-extraneous-dependencies": ["error", { packageDir: "." }],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["packages/babel-parser/typings/babel-parser.d.ts"],
|
||||
linterOptions: {
|
||||
reportUnusedDisableDirectives: "off",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
+6
-2
@@ -52,12 +52,12 @@
|
||||
"charcodes": "^0.2.0",
|
||||
"core-js": "^3.36.1",
|
||||
"eslint": "^9.7.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-formatter-codeframe": "^7.32.1",
|
||||
"eslint-import-resolver-node": "^0.3.9",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-jest": "^27.9.0",
|
||||
"eslint-plugin-n": "^17.9.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-regexp": "^2.6.0",
|
||||
"eslint-plugin-unicorn": "^55.0.0",
|
||||
"execa": "^9.0.0",
|
||||
@@ -112,10 +112,14 @@
|
||||
},
|
||||
"lint-staged": {
|
||||
"./Makefile.source.mjs": [
|
||||
"node ./scripts/pack-script.js --auto"
|
||||
"node ./scripts/pack-script.js --auto",
|
||||
"git add Makefile.js"
|
||||
],
|
||||
"*.{js,cjs,mjs,ts,cts,mts}": [
|
||||
"eslint --format=codeframe --cache --cache-strategy=content"
|
||||
],
|
||||
"*": [
|
||||
"prettier --write --ignore-unknown"
|
||||
]
|
||||
},
|
||||
"changelog": {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// This file is auto-generated! Do not modify it directly.
|
||||
/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents, prettier/prettier */
|
||||
/* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */
|
||||
import * as _babel_types from '@babel/types';
|
||||
|
||||
type BABEL_8_BREAKING = false;
|
||||
|
||||
@@ -7130,12 +7130,12 @@ __metadata:
|
||||
charcodes: "npm:^0.2.0"
|
||||
core-js: "npm:^3.36.1"
|
||||
eslint: "npm:^9.7.0"
|
||||
eslint-config-prettier: "npm:^9.1.0"
|
||||
eslint-formatter-codeframe: "npm:^7.32.1"
|
||||
eslint-import-resolver-node: "npm:^0.3.9"
|
||||
eslint-plugin-import: "npm:^2.29.1"
|
||||
eslint-plugin-jest: "npm:^27.9.0"
|
||||
eslint-plugin-n: "npm:^17.9.0"
|
||||
eslint-plugin-prettier: "npm:^5.1.3"
|
||||
eslint-plugin-regexp: "npm:^2.6.0"
|
||||
eslint-plugin-unicorn: "npm:^55.0.0"
|
||||
execa: "npm:^9.0.0"
|
||||
@@ -9142,6 +9142,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-config-prettier@npm:^9.1.0":
|
||||
version: 9.1.0
|
||||
resolution: "eslint-config-prettier@npm:9.1.0"
|
||||
peerDependencies:
|
||||
eslint: ">=7.0.0"
|
||||
bin:
|
||||
eslint-config-prettier: bin/cli.js
|
||||
checksum: 10/411e3b3b1c7aa04e3e0f20d561271b3b909014956c4dba51c878bf1a23dbb8c800a3be235c46c4732c70827276e540b6eed4636d9b09b444fd0a8e07f0fcd830
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-formatter-codeframe@npm:^7.32.1":
|
||||
version: 7.32.1
|
||||
resolution: "eslint-formatter-codeframe@npm:7.32.1"
|
||||
@@ -9251,26 +9262,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-plugin-prettier@npm:^5.1.3":
|
||||
version: 5.1.3
|
||||
resolution: "eslint-plugin-prettier@npm:5.1.3"
|
||||
dependencies:
|
||||
prettier-linter-helpers: "npm:^1.0.0"
|
||||
synckit: "npm:^0.8.6"
|
||||
peerDependencies:
|
||||
"@types/eslint": ">=8.0.0"
|
||||
eslint: ">=8.0.0"
|
||||
eslint-config-prettier: "*"
|
||||
prettier: ">=3.0.0"
|
||||
peerDependenciesMeta:
|
||||
"@types/eslint":
|
||||
optional: true
|
||||
eslint-config-prettier:
|
||||
optional: true
|
||||
checksum: 10/4f26a30444adc61ed692cdb5a9f7e8d9f5794f0917151051e66755ce032a08c3cc72c8b5d56101412e90f6d77035bd8194ea8731e9c16aacdd5ae345a8dae188
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-plugin-regexp@npm:^2.6.0":
|
||||
version: 2.6.0
|
||||
resolution: "eslint-plugin-regexp@npm:2.6.0"
|
||||
@@ -9781,13 +9772,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-diff@npm:^1.1.2":
|
||||
version: 1.2.0
|
||||
resolution: "fast-diff@npm:1.2.0"
|
||||
checksum: 10/f62419b3d770f201d51c3ee8c4443b752b3ba2d548a6639026b7e09a08203ed2699a8d1fe21efcb8c5186135002d5d2916c12a687cac63785626456a92915adc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-fifo@npm:^1.3.2":
|
||||
version: 1.3.2
|
||||
resolution: "fast-fifo@npm:1.3.2"
|
||||
@@ -14278,15 +14262,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prettier-linter-helpers@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "prettier-linter-helpers@npm:1.0.0"
|
||||
dependencies:
|
||||
fast-diff: "npm:^1.1.2"
|
||||
checksum: 10/00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prettier@npm:^3.3.2":
|
||||
version: 3.3.2
|
||||
resolution: "prettier@npm:3.3.2"
|
||||
@@ -16173,7 +16148,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"synckit@npm:^0.8.5, synckit@npm:^0.8.6":
|
||||
"synckit@npm:^0.8.5":
|
||||
version: 0.8.8
|
||||
resolution: "synckit@npm:0.8.8"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user