Skip to content

Commit 5e4e339

Browse files
committed
fix: eslint + ios android build number
1 parent f829ccc commit 5e4e339

10 files changed

+1282
-1756
lines changed

.eslintrc

-53
This file was deleted.

.eslintrc.js

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
module.exports = {
2+
root: true,
3+
overrides: [
4+
{
5+
files: ['*.ts'],
6+
parser: '@typescript-eslint/parser',
7+
parserOptions: {
8+
project: ['tsconfig.eslint.json'],
9+
createDefaultProgram: true,
10+
},
11+
plugins: ['prettier', 'simple-import-sort'],
12+
extends: [
13+
'plugin:import/recommended',
14+
'plugin:import/typescript',
15+
'airbnb-typescript/base',
16+
'prettier',
17+
'plugin:prettier/recommended',
18+
],
19+
rules: {
20+
'prettier/prettier': 'error',
21+
'simple-import-sort/imports': [
22+
'error',
23+
{
24+
groups: [
25+
// Side effect imports.
26+
['^\\u0000'],
27+
// Parent imports. Put `..` last.
28+
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
29+
// Other relative imports. Put same-folder imports and `.` last.
30+
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
31+
// Style imports.
32+
['^.+\\.s?css$'],
33+
],
34+
},
35+
],
36+
'simple-import-sort/exports': 'error',
37+
'import/first': 'error',
38+
'import/newline-after-import': 'error',
39+
'import/no-duplicates': 'error',
40+
'max-len': [
41+
'error',
42+
{
43+
code: 100,
44+
ignorePattern: '^import .*',
45+
ignoreComments: true,
46+
ignoreUrls: true,
47+
ignoreStrings: true,
48+
ignoreTemplateLiterals: true,
49+
ignoreRegExpLiterals: true,
50+
},
51+
],
52+
'@typescript-eslint/lines-between-class-members': [
53+
'error',
54+
'always',
55+
{ exceptAfterSingleLine: true },
56+
],
57+
'@typescript-eslint/naming-convention': [
58+
'error',
59+
{
60+
selector: 'interface',
61+
format: ['PascalCase'],
62+
custom: {
63+
regex: '^I[A-Z]',
64+
match: true,
65+
},
66+
},
67+
{
68+
selector: 'typeAlias',
69+
format: ['PascalCase'],
70+
custom: {
71+
regex: '^T[A-Z]',
72+
match: true,
73+
},
74+
},
75+
{
76+
selector: 'enum',
77+
format: ['PascalCase'],
78+
custom: {
79+
regex: '^E[A-Z]',
80+
match: true,
81+
},
82+
},
83+
],
84+
},
85+
reportUnusedDisableDirectives: true,
86+
},
87+
{
88+
files: ['*.interface.ts', '*.enum.ts', '*.model.ts'],
89+
parser: '@typescript-eslint/parser',
90+
parserOptions: {
91+
extraFileExtensions: ['*.ts'],
92+
project: ['tsconfig.eslint.json'],
93+
createDefaultProgram: true,
94+
},
95+
plugins: ['prettier'],
96+
extends: ['plugin:typescript-sort-keys/recommended'],
97+
},
98+
{
99+
files: ['src/**/*.spec.ts', 'src/**/*.d.ts', 'src/**/*.mock.ts'],
100+
parserOptions: {
101+
project: ['tsconfig.eslint.json'],
102+
createDefaultProgram: true,
103+
},
104+
plugins: ['prettier', 'jasmine'],
105+
extends: ['plugin:jasmine/recommended'],
106+
env: { jasmine: true },
107+
rules: {
108+
'@typescript-eslint/no-unused-vars': 'off',
109+
'jasmine/no-disabled-tests': 'off',
110+
},
111+
},
112+
],
113+
};

.prettierrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"arrowParens": "avoid",
3+
"trailingComma": "es5",
4+
"tabWidth": 2,
5+
"semi": true,
6+
"singleQuote": true,
7+
"printWidth": 100,
8+
"attributeSort": "ASC",
9+
"attributeGroups": [
10+
"$DEFAULT",
11+
"^data-"
12+
]
13+
}

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"editor.formatOnSave": true,
2+
"editor.formatOnSave": false,
33
"javascript.format.enable": false
44
}

package.json

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "capacitor-standard-version",
3-
"version": "1.0.12",
3+
"version": "1.0.13",
44
"description": "Default standard-version config for capacitor app",
55
"main": "dist/index.js",
66
"bin": {
@@ -36,20 +36,26 @@
3636
"devDependencies": {
3737
"@types/adm-zip": "^0.4.34",
3838
"@types/fs-extra": "^9.0.13",
39-
"@typescript-eslint/eslint-plugin": "5.14.0",
40-
"@typescript-eslint/parser": "^5.14.0",
41-
"awesome-typescript-loader": "^5.2.1",
42-
"eslint": "^8.11.0",
43-
"eslint-config-airbnb-base": "^15.0.0",
39+
"@types/node": "^18.7.15",
40+
"@typescript-eslint/eslint-plugin": "^5.36.1",
41+
"@typescript-eslint/parser": "^5.36.1",
42+
"eslint": "^8.23.0",
43+
"eslint-config-airbnb-typescript": "^17.0.0",
4444
"eslint-config-prettier": "^8.5.0",
45-
"eslint-import-resolver-typescript": "^2.5.0",
46-
"eslint-plugin-import": "^2.25.4",
47-
"eslint-plugin-prettier": "^4.0.0",
45+
"eslint-plugin-import": "^2.26.0",
46+
"eslint-plugin-jasmine": "^4.1.3",
47+
"eslint-plugin-prettier": "^4.2.1",
48+
"eslint-plugin-simple-import-sort": "^7.0.0",
49+
"eslint-plugin-typescript-sort-keys": "^2.1.0",
4850
"git-format-staged": "^2.1.3",
4951
"husky": "^7.0.4",
5052
"nodemon": "^2.0.15",
5153
"pkg": "^5.5.2",
52-
"prettier": "^2.5.1",
54+
"prettier": "^2.7.1",
55+
"prettier-eslint": "^15.0.1",
56+
"prettier-eslint-cli": "^7.1.0",
57+
"prettier-plugin-organize-attributes": "^0.0.5",
58+
"ts-loader": "^9.3.1",
5359
"ts-node": "^10.7.0",
5460
"tsconfig-paths": "^3.14.0",
5561
"typescript": "^4.6.2",

0 commit comments

Comments
 (0)