Skip to content

Commit e017790

Browse files
authored
ci: Update prettier to run on all js files in addition to ts (#67230)
We should always treat js,jsx,ts,tsx files the same in our codebase in terms of linting/formatting/etc. While there shouldn't be any jsx files, and the only js files would be scripts or configs... in case things get added I want the tools to run against them. Also, it simplifies things when trying to figure out what tools are running if the globs are the same & comprehensive in all places.
1 parent c59f312 commit e017790

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/tests/**/fixtures/**/*
2+
fixtures/**/*
3+
tests/relay_integration/**/*

api-docs/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/* global process */
22
/* eslint-env node */
33
/* eslint import/no-unresolved:0 */
4-
import fs from 'node:fs';
5-
import path from 'node:path';
6-
74
import yaml from 'js-yaml';
85
import JsonRefs from 'json-refs';
6+
import fs from 'node:fs';
7+
import path from 'node:path';
98

109
function dictToString(dict) {
1110
const res = [];

api-docs/openapi-diff.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
/* eslint-env node */
22
/* eslint import/no-unresolved:0 */
33

4-
import fs from 'node:fs';
5-
import https from 'node:https';
6-
74
import yaml from 'js-yaml';
85
import jsonDiff from 'json-diff';
6+
import fs from 'node:fs';
7+
import https from 'node:https';
98

109
async function main() {
1110
const openApiData = await new Promise((resolve, reject) =>

api-docs/watch.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import {spawn} from 'node:child_process';
44
import {join} from 'node:path';
55
import {stderr, stdout} from 'node:process';
6-
76
import sane from 'sane';
87

98
const watcherPy = sane(join(__dirname, '../src/sentry'));

build-utils/last-built-plugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import fs from 'node:fs';
44
import path from 'node:path';
5-
65
import type webpack from 'webpack';
76

87
type Options = {

config/webpack.chartcuterie.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import childProcess from 'node:child_process';
44
import path from 'node:path';
5-
65
import webpack from 'webpack';
76

87
import baseConfig from '../webpack.config';

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@
226226
"lint:js": "eslint static/app tests/js --ext .js,.jsx,.ts,.tsx",
227227
"lint:css": "stylelint 'static/app/**/*.[jt]sx'",
228228
"lint:biome": "biome check .",
229-
"lint:prettier": "prettier \"**/*.md\" \"**/*.yaml\" \"**/*.{ts,tsx}\" --check",
229+
"lint:prettier": "prettier \"**/*.md\" \"**/*.yaml\" \"**/*.[jt]s(x)?\" --check",
230230
"fix": "yarn fix:biome && yarn fix:prettier && yarn fix:eslint",
231231
"fix:eslint": "eslint static/app tests/js --ext .js,.jsx,.ts,.tsx --fix",
232232
"fix:biome": "biome check . --apply",
233-
"fix:prettier": "prettier \"**/*.md\" \"**/*.yaml\" \"**/*.{ts,tsx}\" --write",
233+
"fix:prettier": "prettier \"**/*.md\" \"**/*.yaml\" \"**/*.[jt]s(x)?\" --write",
234234
"dev": "(yarn check --verify-tree || yarn install --check-files) && sentry devserver",
235235
"dev-ui": "SENTRY_UI_DEV_ONLY=1 SENTRY_WEBPACK_PROXY_PORT=7999 yarn webpack serve",
236236
"dev-acceptance": "NO_DEV_SERVER=1 NODE_ENV=development yarn webpack --watch",
@@ -265,7 +265,9 @@
265265
"last 3 iOS major versions",
266266
"Firefox ESR"
267267
],
268-
"test": ["current node"]
268+
"test": [
269+
"current node"
270+
]
269271
},
270272
"volta": {
271273
"extends": ".volta.json"

0 commit comments

Comments
 (0)