Skip to content

Commit

Permalink
Update config
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebriday-pa committed Mar 27, 2024
1 parent 9a7eaca commit 02e22f1
Show file tree
Hide file tree
Showing 11 changed files with 1,026 additions and 1,267 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ module.exports = {
browser: true,
node: true,
es6: true,
jest: true,
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: ["standard", "prettier"],
plugins: ["@typescript-eslint"],
};
}
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ index.html
netlify.toml
.node-version
.eslintrc.js
specs
spec
tsconfig.json
vite.config.js
vite.config.mjs
.prettierignore
postcss.config.js
tailwind.config.js
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"printWidth": 120
"printWidth": 120,
"semi": false
}
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<title>Stimulus Skeleton</title>

<script type="module" defer>
import "./src/app.css";
import { Application } from "@hotwired/stimulus";
import Skeleton from "./src/index";
import "./src/app.css"
import { Application } from "@hotwired/stimulus"
import Skeleton from "./src/index"

const application = Application.start();
application.register("skeleton", Skeleton);
const application = Application.start()
application.register("skeleton", Skeleton)
</script>
</head>

Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "dist/stimulus-skeleton.mjs",
"types": "dist/types/index.d.ts",
"scripts": {
"lint": "eslint --ext .js,.mjs,.ts . && prettier . --check",
"lint": "tsc --noEmit && eslint --ext .js,.mjs,.ts . && prettier . --check",
"lintfix": "eslint --ext .js,.mjs,.ts . --fix && prettier . --write",
"types": "tsc --noEmit false --declaration true --emitDeclarationOnly true --outDir dist/types",
"dev": "vite",
Expand All @@ -33,14 +33,14 @@
"np": "np --no-2fa --no-tests"
},
"devDependencies": {
"@babel/core": "7.23.9",
"@babel/core": "7.24.3",
"@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.23.9",
"@babel/preset-typescript": "7.23.3",
"@babel/preset-env": "7.24.3",
"@babel/preset-typescript": "7.24.1",
"@hotwired/stimulus": "^3",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"autoprefixer": "10.4.17",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"autoprefixer": "10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "17.1.0",
Expand All @@ -49,14 +49,14 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-standard": "5.0.0",
"np": "9.2.0",
"postcss": "8.4.35",
"np": "10.0.2",
"postcss": "8.4.38",
"prettier": "3.2.5",
"tailwindcss": "3.4.1",
"typescript": "^5.3.3",
"vite": "5.1.4"
"tailwindcss": "3.4.2",
"typescript": "^5.4.2",
"vite": "5.2.6"
},
"peerDependencies": {
"@hotwired/stimulus": "^3"
"@hotwired/stimulus": "^3.0.0"
}
}
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
};
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller } from "@hotwired/stimulus";
import { Controller } from "@hotwired/stimulus"

export default class Skeleton extends Controller {
connect(): void {
console.log("it works!");
console.log("it works!")
}
}
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
};
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"lib": ["dom", "es6"],
"types": ["vite/client"],
"skipLibCheck": true
}
},
"exclude": ["node_modules", "spec", "jest"]
}
10 changes: 5 additions & 5 deletions vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { resolve } from "path";
import { defineConfig } from "vite";
import { resolve } from "path"
import { defineConfig } from "vite"

export default defineConfig(({ mode }) => {
if (mode === "netlify") {
return {};
return {}
}

return {
Expand All @@ -25,5 +25,5 @@ export default defineConfig(({ mode }) => {
},
},
},
};
});
}
})
Loading

0 comments on commit 02e22f1

Please sign in to comment.