Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions assets/plugin-template/.eslintignore

This file was deleted.

16 changes: 16 additions & 0 deletions assets/plugin-template/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const ionic = require('@ionic/eslint-config/recommended');

module.exports = [
{
ignores: [
'**/build/**',
'**/dist/**',
'example-app/**',
// lint TypeScript only
'**/*.js',
'**/*.mjs',
'**/*.cjs',
],
},
...ionic,
];
9 changes: 3 additions & 6 deletions assets/plugin-template/package.json.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"verify:web": "npm run build",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
"eslint": "eslint . --ext ts",
"eslint": "eslint .",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api {{ CLASS }}Plugin --output-readme README.md --output-json dist/docs.json",
Expand All @@ -52,10 +52,10 @@
"@capacitor/core": "^{{{ CAPACITOR_VERSION }}}",
"@capacitor/docgen": "^0.3.1",
"@capacitor/ios": "^{{{ CAPACITOR_VERSION }}}",
"@ionic/eslint-config": "^0.4.0",
"@ionic/eslint-config": "^0.5.0",
"@ionic/prettier-config": "^4.0.0",
"@ionic/swiftlint-config": "^2.0.0",
"eslint": "^8.57.1",
"eslint": "^10.0.0",
"prettier": "^3.6.2",
"prettier-plugin-java": "^2.7.7",
"rimraf": "^6.1.0",
Expand All @@ -68,9 +68,6 @@
},
"prettier": "@ionic/prettier-config",
"swiftlint": "@ionic/swiftlint-config",
"eslintConfig": {
"extends": "@ionic/eslint-config/recommended"
},
"capacitor": {
"ios": {
"src": "ios"
Expand Down
14 changes: 14 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const ionic = require('@ionic/eslint-config/recommended');

module.exports = [
{
ignores: [
'**/dist/**',
// lint TypeScript only
'**/*.js',
'**/*.mjs',
'**/*.cjs',
],
},
...ionic,
];
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"pack-assets": "node ./scripts/pack-assets.mjs",
"lint": "npm run eslint && npm run prettier -- --check",
"fmt": "npm run eslint -- --fix && npm run prettier -- --write",
"eslint": "eslint . --ext ts",
"eslint": "eslint .",
"prettier": "prettier \"**/*.{css,html,js,mjs,ts}\"",
"build": "npm run clean && npm run pack-assets && tsc",
"clean": "rimraf ./dist",
Expand Down Expand Up @@ -44,9 +44,6 @@
},
"license": "MIT",
"prettier": "@ionic/prettier-config",
"eslintConfig": {
"extends": "@ionic/eslint-config/recommended"
},
"dependencies": {
"debug": "^4.4.3",
"kleur": "^4.1.5",
Expand All @@ -56,12 +53,12 @@
"tslib": "^2.8.1"
},
"devDependencies": {
"@ionic/eslint-config": "^0.4.0",
"@ionic/eslint-config": "^0.5.0",
"@ionic/prettier-config": "^4.0.0",
"@types/debug": "^4.1.12",
"@types/mustache": "^4.2.6",
"@types/prompts": "^2.4.9",
"eslint": "^8.57.1",
"eslint": "^10.0.0",
"np": "^10.2.0",
"prettier": "^3.7.4",
"rimraf": "^6.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const isInsideGitRepo = async (cwd: string): Promise<boolean> => {
try {
await runSilent('git', ['rev-parse', '--is-inside-work-tree'], { cwd, stdio: 'ignore' });
return true;
} catch (e) {
} catch {
return false;
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const folderExists = async (folderPath: string): Promise<boolean> => {
try {
const files = await readdir(folderPath);
return files != null;
} catch (err) {
} catch {
return false;
}
};
Expand Down
Loading