Skip to content

Commit

Permalink
feat: dedicated config for svelte projects (#12)
Browse files Browse the repository at this point in the history
* ci: remove MegaLinter

* feat: dedicated config for svelte projects
  • Loading branch information
lars-reimann authored Feb 13, 2024
1 parent 2735faa commit df71e41
Show file tree
Hide file tree
Showing 14 changed files with 6,603 additions and 10,328 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/megalinter.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .mega-linter.yml

This file was deleted.

1 change: 0 additions & 1 deletion .npmignore

This file was deleted.

16,729 changes: 6,460 additions & 10,269 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 12 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
{
"name": "@lars-reimann/prettier-config",
"version": "5.0.0",
"description": "Configuration for Prettier",
"main": ".prettierrc.json",
"license": "MIT",
"keywords": [
"prettier",
"prettierconfig"
],
"repository": {
"type": "git",
"url": "https://github.com/lars-reimann/prettier-config"
},
"homepage": "https://github.com/lars-reimann/prettier-config",
"peerDependencies": {
"prettier": "^3.2.5"
},
"devDependencies": {
"conventional-changelog-conventionalcommits": "^7.0.2",
"semantic-release": "^23.0.2"
},
"publishConfig": {
"provenance": true
}
"name": "prettier-config",
"version": "0.0.0",
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^11.0.2",
"conventional-changelog-conventionalcommits": "^7.0.2",
"semantic-release": "^23.0.2"
}
}
2 changes: 1 addition & 1 deletion .prettierrc.json → packages/base/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"quoteProps": "as-needed",
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"bracketSameLine": false,
"arrowParens": "always",
"requirePragma": false,
"insertPragma": false,
Expand Down
21 changes: 21 additions & 0 deletions packages/base/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Lars Reimann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md → packages/base/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Configuration for [Prettier](https://prettier.io/)
# Basic Configuration for [Prettier](https://prettier.io/)

To use this configuration:

Expand Down
22 changes: 22 additions & 0 deletions packages/base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@lars-reimann/prettier-config",
"version": "5.1.0",
"description": "Configuration for Prettier",
"main": ".prettierrc.json",
"license": "MIT",
"keywords": [
"prettier",
"prettierconfig"
],
"repository": {
"type": "git",
"url": "https://github.com/lars-reimann/prettier-config"
},
"homepage": "https://github.com/lars-reimann/prettier-config",
"peerDependencies": {
"prettier": "^3.2.5"
},
"publishConfig": {
"provenance": true
}
}
10 changes: 10 additions & 0 deletions packages/svelte/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const baseConfig = require('@lars-reimann/prettier-config');

module.exports = {
...baseConfig,
'plugins': ['prettier-plugin-svelte'],
'overrides': [
...baseConfig.overrides,
{ 'files': '*.svelte', 'options': { 'parser': 'svelte' } },
],
};
21 changes: 21 additions & 0 deletions packages/svelte/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Lars Reimann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
14 changes: 14 additions & 0 deletions packages/svelte/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Configuration for [Prettier](https://prettier.io/) in Svelte Projects

To use this configuration:

1. Run `npm install --save-dev @lars-reimann/prettier-config-svelte`.
2. Include the following in your `package.json`:

```
{
...
"prettier": "@lars-reimann/prettier-config-svelte",
...
}
```
23 changes: 23 additions & 0 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@lars-reimann/prettier-config-svelte",
"version": "5.1.0",
"description": "Configuration for Prettier",
"main": ".prettierrc.js",
"license": "MIT",
"keywords": [
"prettier",
"prettierconfig"
],
"repository": {
"type": "git",
"url": "https://github.com/lars-reimann/prettier-config"
},
"homepage": "https://github.com/lars-reimann/prettier-config",
"dependencies": {
"@lars-reimann/prettier-config": ">=5.1.0",
"prettier-plugin-svelte": "^3.1.2"
},
"publishConfig": {
"provenance": true
}
}
29 changes: 18 additions & 11 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
module.exports = {
"branches": ["main"],
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "conventionalcommits",
}],
["@semantic-release/release-notes-generator", {
"preset": "conventionalcommits",
}],
"@semantic-release/npm",
"@semantic-release/github",
]
'branches': ['main'],
'plugins': [
['@semantic-release/commit-analyzer', { preset: 'conventionalcommits' }],
['@semantic-release/release-notes-generator', { preset: 'conventionalcommits' }],
['@semantic-release/npm', { pkgRoot: 'packages/base' }],
['@semantic-release/npm', { pkgRoot: 'packages/svelte' }],
'@semantic-release/github',
[
'@semantic-release/git',
{
assets: [
'package-lock.json',
'packages/base/package.json',
'packages/svelte/package.json',
],
},
],
],
};

0 comments on commit df71e41

Please sign in to comment.