Skip to content

Commit 51481cd

Browse files
committed
chore(release): 2.0.0
1 parent f9dcf06 commit 51481cd

File tree

5 files changed

+111
-123
lines changed

5 files changed

+111
-123
lines changed

.npmrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
2+
13
# npm options
24
auth-type=legacy
35

@@ -7,4 +9,4 @@ enable-pre-post-scripts = true
79
link-workspace-packages = false
810
shamefully-hoist = true
911
shared-workspace-lockfile = true
10-
strict-peer-dependencies = false
12+
strict-peer-dependencies = false

.oxlintrc.json

Lines changed: 101 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,178 +1,163 @@
11
{
2-
"ignore": [
3-
"**/*.coffee",
4-
"**/*.css",
5-
"**/*.hbs",
6-
"**/*.json",
7-
"**/*.less",
8-
"**/*.scss",
9-
"**/*.svg",
10-
"dist/**",
11-
"node_modules/**"
12-
],
13-
"project": [
14-
"./apps/desktop/tsconfig.json",
15-
"./apps/web/tsconfig.json",
16-
"./shared/tsconfig.lint.json"
17-
],
2+
"ignore": ["dist/**", "node_modules/**"],
183
"rules": {
19-
"correctness/no-array-constructor": "error",
20-
"correctness/no-class-assign": "error",
21-
"correctness/no-cond-assign": "error",
22-
"correctness/no-const-assign": "error",
23-
"correctness/no-constant-condition": "warn",
24-
"correctness/no-control-regex": "error",
25-
"correctness/no-debugger": "error",
26-
"correctness/no-dupe-args": "error",
27-
"correctness/no-dupe-class-members": "error",
28-
"correctness/no-dupe-keys": "error",
29-
"correctness/no-duplicate-case": "error",
30-
"correctness/no-empty-character-class": "error",
31-
"correctness/no-empty-pattern": "error",
32-
"correctness/no-ex-assign": "error",
33-
"correctness/no-func-assign": "error",
34-
"correctness/no-invalid-regexp": "error",
35-
"correctness/no-irregular-whitespace": "error",
36-
"correctness/no-obj-calls": "error",
37-
"correctness/no-octal": "error",
38-
"correctness/no-prototype-builtins": "error",
39-
"correctness/no-regex-spaces": "error",
40-
"correctness/no-self-assign": "error",
41-
"correctness/no-sparse-arrays": "error",
42-
"correctness/no-template-curly-in-string": "error",
43-
"correctness/no-this-before-super": "error",
44-
"correctness/no-undef": "error",
45-
"correctness/no-unreachable": "error",
46-
"correctness/no-unsafe-finally": "error",
47-
"correctness/no-unsafe-negation": "error",
48-
"correctness/require-yield": "error",
49-
"correctness/use-isnan": "error",
50-
"correctness/valid-typeof": "error",
51-
"performance/no-new-buffer": "error",
52-
"style/camelcase": [
4+
"no-array-constructor": "error",
5+
"no-class-assign": "error",
6+
"no-cond-assign": "error",
7+
"no-const-assign": "error",
8+
"no-constant-condition": "warn",
9+
"no-control-regex": "error",
10+
"no-debugger": "error",
11+
"no-dupe-args": "error",
12+
"no-dupe-class-members": "error",
13+
"no-dupe-keys": "error",
14+
"no-duplicate-case": "error",
15+
"no-empty-character-class": "error",
16+
"no-empty-pattern": "error",
17+
"no-ex-assign": "error",
18+
"no-func-assign": "error",
19+
"no-invalid-regexp": "error",
20+
"no-irregular-whitespace": "error",
21+
"no-obj-calls": "error",
22+
"no-octal": "error",
23+
"no-prototype-builtins": "error",
24+
"no-regex-spaces": "error",
25+
"no-self-assign": "error",
26+
"no-sparse-arrays": "error",
27+
"no-template-curly-in-string": "error",
28+
"no-this-before-super": "error",
29+
"no-undef": "error",
30+
"no-unreachable": "error",
31+
"no-unsafe-finally": "error",
32+
"no-unsafe-negation": "error",
33+
"require-yield": "error",
34+
"use-isnan": "error",
35+
"valid-typeof": "error",
36+
"no-new-buffer": "error",
37+
"camelcase": [
5338
"error",
5439
{
5540
"properties": "never"
5641
}
5742
],
58-
"style/capitalized-comments": "off",
59-
"style/comma-dangle": ["error", "never"],
60-
"style/eqeqeq": [
43+
"capitalized-comments": "off",
44+
"comma-dangle": ["error", "never"],
45+
"eqeqeq": [
6146
"error",
6247
"always",
6348
{
6449
"null": "ignore"
6550
}
6651
],
67-
"style/linebreak-style": ["error", "unix"],
68-
"style/new-cap": [
52+
"linebreak-style": ["error", "unix"],
53+
"new-cap": [
6954
"error",
7055
{
7156
"capIsNew": false,
7257
"newIsCap": true
7358
}
7459
],
75-
"style/no-bitwise": "error",
76-
"style/no-continue": "error",
77-
"style/no-else-return": "error",
78-
"style/no-lonely-if": "error",
79-
"style/no-multi-assign": ["error"],
80-
"style/no-new-object": "error",
81-
"style/no-param-reassign": ["warn", { "props": false }],
82-
"style/no-plusplus": [
60+
"no-bitwise": "error",
61+
"no-continue": "error",
62+
"no-else-return": "error",
63+
"no-lonely-if": "error",
64+
"no-multi-assign": ["error"],
65+
"no-new-object": "error",
66+
"no-param-reassign": ["warn", { "props": false }],
67+
"no-plusplus": [
8368
"error",
8469
{
8570
"allowForLoopAfterthoughts": true
8671
}
8772
],
88-
"style/no-unneeded-ternary": [
73+
"no-unneeded-ternary": [
8974
"error",
9075
{
9176
"defaultAssignment": false
9277
}
9378
],
94-
"style/no-var": "error",
95-
"style/object-shorthand": [
79+
"no-var": "error",
80+
"object-shorthand": [
9681
"error",
9782
"always",
9883
{
9984
"avoidQuotes": true,
10085
"ignoreConstructors": false
10186
}
10287
],
103-
"style/one-var": ["error", "never"],
104-
"style/operator-assignment": ["error", "always"],
105-
"style/prefer-const": [
88+
"one-var": ["error", "never"],
89+
"operator-assignment": ["error", "always"],
90+
"prefer-const": [
10691
"error",
10792
{
10893
"destructuring": "any",
10994
"ignoreReadBeforeAssign": true
11095
}
11196
],
112-
"style/prefer-destructuring": [
97+
"prefer-destructuring": [
11398
"warn",
11499
{
115100
"array": false,
116101
"object": true
117102
}
118103
],
119-
"style/prefer-numeric-literals": "error",
120-
"style/prefer-rest-params": "error",
121-
"style/prefer-spread": "error",
122-
"style/prefer-template": "error",
123-
"style/radix": "error",
124-
"style/spaced-comment": ["error", "always"],
125-
"style/strict": "error",
126-
"style/symbol-description": "error",
127-
"style/vars-on-top": "error",
128-
"style/yoda": "error",
129-
"suspicious/no-await-in-loop": "error",
130-
"suspicious/no-compare-neg-zero": "error",
131-
"suspicious/no-empty": ["error", { "allowEmptyCatch": true }],
132-
"suspicious/no-empty-function": [
104+
"prefer-numeric-literals": "error",
105+
"prefer-rest-params": "error",
106+
"prefer-spread": "error",
107+
"prefer-template": "error",
108+
"radix": "error",
109+
"spaced-comment": ["error", "always"],
110+
"strict": "error",
111+
"symbol-description": "error",
112+
"vars-on-top": "error",
113+
"yoda": "error",
114+
"no-await-in-loop": "error",
115+
"no-compare-neg-zero": "error",
116+
"no-empty": ["error", { "allowEmptyCatch": true }],
117+
"no-empty-function": [
133118
"error",
134119
{
135120
"allow": ["arrowFunctions", "functions", "methods"]
136121
}
137122
],
138-
"suspicious/no-eval": "error",
139-
"suspicious/no-extend-native": "error",
140-
"suspicious/no-extra-bind": "error",
141-
"suspicious/no-extra-boolean-cast": "error",
142-
"suspicious/no-fallthrough": "error",
143-
"suspicious/no-global-assign": "error",
144-
"suspicious/no-implied-eval": "error",
145-
"suspicious/no-inner-declarations": "error",
146-
"suspicious/no-iterator": "error",
147-
"suspicious/no-labels": "error",
148-
"suspicious/no-lone-blocks": "error",
149-
"suspicious/no-loop-func": "error",
150-
"suspicious/no-multi-str": "error",
151-
"suspicious/no-new": "error",
152-
"suspicious/no-new-func": "error",
153-
"suspicious/no-new-wrappers": "error",
154-
"suspicious/no-octal-escape": "error",
155-
"suspicious/no-return-assign": "error",
156-
"suspicious/no-return-await": "error",
157-
"suspicious/no-script-url": "error",
158-
"suspicious/no-self-compare": "error",
159-
"suspicious/no-sequences": "error",
160-
"suspicious/no-throw-literal": "error",
161-
"suspicious/no-unmodified-loop-condition": "off",
162-
"suspicious/no-unused-expressions": [
123+
"no-eval": "error",
124+
"no-extend-native": "error",
125+
"no-extra-bind": "error",
126+
"no-extra-boolean-cast": "error",
127+
"no-fallthrough": "error",
128+
"no-global-assign": "error",
129+
"no-implied-eval": "error",
130+
"no-inner-declarations": "error",
131+
"no-iterator": "error",
132+
"no-labels": "error",
133+
"no-lone-blocks": "error",
134+
"no-loop-func": "error",
135+
"no-multi-str": "error",
136+
"no-new": "error",
137+
"no-new-func": "error",
138+
"no-new-wrappers": "error",
139+
"no-octal-escape": "error",
140+
"no-return-assign": "error",
141+
"no-return-await": "error",
142+
"no-script-url": "error",
143+
"no-self-compare": "error",
144+
"no-sequences": "error",
145+
"no-throw-literal": "error",
146+
"no-unmodified-loop-condition": "off",
147+
"no-unused-expressions": [
163148
"error",
164149
{
165150
"allowShortCircuit": true,
166151
"allowTernary": false
167152
}
168153
],
169-
"suspicious/no-unused-labels": "error",
170-
"suspicious/no-useless-concat": "error",
171-
"suspicious/no-useless-constructor": "error",
172-
"suspicious/no-useless-escape": "error",
173-
"suspicious/no-useless-return": "error",
174-
"suspicious/no-void": "off",
175-
"suspicious/no-with": "error",
154+
"no-unused-labels": "error",
155+
"no-useless-concat": "error",
156+
"no-useless-constructor": "error",
157+
"no-useless-escape": "error",
158+
"no-useless-return": "error",
159+
"no-void": "off",
160+
"no-with": "error",
176161
"unicorn/no-new-array": "off",
177162
"unicorn/no-useless-fallback-in-spread": "off",
178163
"react/rules-of-hooks": "error",

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prettier-plugin-package",
3-
"version": "1.4.0",
3+
"version": "2.0.0",
44
"description": "An opinionated package.json formatter plugin for Prettier",
55
"license": "MPL-2.0",
66
"repository": "shellscape/prettier-plugin-package",
@@ -17,7 +17,7 @@
1717
"ci:lint": "npm run lint && npm run security",
1818
"ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
1919
"ci:test": "npm run test -- --reporter=verbose",
20-
"lint": "eslint --fix --cache lib test && prettier --write package.json",
20+
"lint": "oxlint --format stylish lib test && prettier --write package.json",
2121
"lint-staged": "lint-staged",
2222
"prepublishOnly": "npm run lint",
2323
"security": "npm audit",
@@ -49,8 +49,9 @@
4949
"vitest": "^3.2.4"
5050
},
5151
"lint-staged": {
52-
"*.js": [
53-
"eslint --fix"
52+
"*.{ts,js}?(x)": [
53+
"oxlint --format stylish --fix",
54+
"prettier --write"
5455
]
5556
},
5657
"pre-commit": "lint-staged"

test/randomized.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const shuffle = (arr) => {
1919

2020
test('randomize', async () => {
2121
const options = {
22-
filepath: join(__dirname, 'package.json'),
22+
filepath: join(import.meta.dirname, 'package.json'),
2323
parser: 'json-stringify',
2424
plugins: [plugin],
2525
};

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test('broken json', async () => {
2929
};
3030

3131
const broken = readFileSync(
32-
join(__dirname, './fixtures/broken.json'),
32+
join(import.meta.dirname, './fixtures/broken.json'),
3333
'utf-8',
3434
);
3535

0 commit comments

Comments
 (0)