Skip to content
This repository was archived by the owner on Sep 20, 2025. It is now read-only.

Commit 1dacecd

Browse files
committed
chore: rename package and add prettier-config
1 parent fe03593 commit 1dacecd

File tree

8 files changed

+293
-44
lines changed

8 files changed

+293
-44
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "@chieforz/tslint-config-root",
2+
"name": "@chieforz/code-styles",
33
"version": "1.1.1",
44
"repository": {
55
"type": "git",
6-
"url": "https://github.com/ChiefORZ/tslint-config"
6+
"url": "https://github.com/ChiefORZ/code-styles"
77
},
88
"author": "ChiefORZ <[email protected]>",
99
"scripts": {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/** @type {import('prettier').Options} */
2+
module.exports = {
3+
arrowParens: 'always',
4+
plugins: [
5+
require('prettier-plugin-tailwindcss'),
6+
require('prettier-plugin-packagejson'),
7+
],
8+
semi: true,
9+
singleQuote: true,
10+
tabWidth: 2,
11+
trailingComma: 'es5',
12+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@chieforz/prettier-config",
3+
"version": "1.1.1",
4+
"keywords": [
5+
"prettier",
6+
"prettier-config",
7+
"prettier config"
8+
],
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/ChiefORZ/code-styles"
12+
},
13+
"license": "UNLICENSED",
14+
"author": "ChiefORZ <[email protected]>",
15+
"main": "lib/prettier-config.js",
16+
"directories": {
17+
"lib": "lib"
18+
},
19+
"files": [
20+
"lib"
21+
],
22+
"dependencies": {
23+
"prettier": "^2.7.1",
24+
"prettier-plugin-packagejson": "^2.4.3",
25+
"prettier-plugin-tailwindcss": "^0.3.0"
26+
},
27+
"publishConfig": {
28+
"access": "public",
29+
"registry": "https://registry.npmjs.org/"
30+
}
31+
}

packages/base/lib/tslint-config.js renamed to packages/tslint-config-base/lib/tslint-config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
"simple-import-sort",
77
"sort-keys-fix",
88
"import",
9+
"json-files",
910
],
1011
env: {
1112
node: true,
@@ -58,6 +59,10 @@ module.exports = {
5859
"import/first": "error",
5960
"import/newline-after-import": "error",
6061
"import/no-duplicates": "error",
62+
"json-files/require-engines": "warn",
63+
"json-files/require-license": "warn",
64+
"json-files/require-unique-dependency-names": "error",
65+
"json-files/sort-package-json": "warn",
6166
"no-empty": "off",
6267
"no-useless-escape": "off",
6368
"prettier/prettier": "warn",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@
2727
"eslint-config-prettier": "^8.5.0",
2828
"eslint-plugin-eslint-comments": "^3.2.0",
2929
"eslint-plugin-import": "^2.26.0",
30+
"eslint-plugin-json-files": "^2.2.0",
3031
"eslint-plugin-prefer-arrow": "^1.2.3",
3132
"eslint-plugin-prettier": "^4.2.1",
32-
"eslint-plugin-sort-keys-fix": "^1.1.2",
3333
"eslint-plugin-simple-import-sort": "^10.0.0",
34+
"eslint-plugin-sort-keys-fix": "^1.1.2",
3435
"prettier": "^2.7.1",
3536
"typescript": "^5.0.0"
3637
},

packages/react/lib/tslint-config-react.js renamed to packages/tslint-config-react/lib/tslint-config-react.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
"sort-keys-fix",
66
"validate-jsx-nesting",
77
"@typescript-eslint",
8+
"json-files",
89
],
910
extends: [
1011
"airbnb-typescript",
@@ -53,6 +54,10 @@ module.exports = {
5354
},
5455
],
5556
"import/prefer-default-export": "off",
57+
"json-files/require-engines": "warn",
58+
"json-files/require-license": "warn",
59+
"json-files/require-unique-dependency-names": "error",
60+
"json-files/sort-package-json": "warn",
5661
"max-len": [
5762
"warn",
5863
{
@@ -75,13 +80,13 @@ module.exports = {
7580
"react/jsx-one-expression-per-line": "off",
7681
"react/jsx-props-no-spreading": "off",
7782
"react/jsx-sort-props": [
78-
2,
83+
"error",
7984
{
8085
callbacksLast: false,
81-
shorthandFirst: false,
82-
shorthandLast: false,
8386
ignoreCase: true,
8487
noSortAlphabetically: false,
88+
shorthandFirst: false,
89+
shorthandLast: false,
8590
},
8691
],
8792
"react/jsx-wrap-multilines": "off",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"eslint-config-react-app": "^7.0.1",
2929
"eslint-import-resolver-typescript": "^3.5.5",
3030
"eslint-plugin-import": "^2.27.5",
31+
"eslint-plugin-json-files": "^2.2.0",
3132
"eslint-plugin-jsx-a11y": "^6.7.1",
3233
"eslint-plugin-prettier": "^4.2.1",
3334
"eslint-plugin-react": "^7.32.2",

0 commit comments

Comments
 (0)