Skip to content

Commit

Permalink
refactor: run Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
MrChocolatine committed Nov 30, 2023
1 parent 592cdef commit 0ef27d7
Show file tree
Hide file tree
Showing 37 changed files with 145 additions and 187 deletions.
11 changes: 5 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,27 @@
version: 2

updates:

# Required options
- package-ecosystem: npm
directory: "/"
directory: '/'
schedule:
interval: weekly
day: saturday
time: "00:00"
time: '00:00'
timezone: Europe/Paris

# Behaviour of pull requests
open-pull-requests-limit: 2
pull-request-branch-name:
separator: "-"
separator: '-'
commit-message:
prefix: build
include: scope

# Metadata of pull requests
reviewers:
- "DazzlingFugu/emberenos"
- 'DazzlingFugu/emberenos'

# Control which dependencies are updated
ignore:
- dependency-name: "ember-cli"
- dependency-name: 'ember-cli'
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ on:
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: "Tests"
name: 'Tests'
runs-on: ubuntu-latest

steps:
Expand All @@ -40,7 +40,7 @@ jobs:
run: yarn test

floating:
name: "Floating Dependencies"
name: 'Floating Dependencies'
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
'use strict'

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
semi: false,
singleQuote: true,
};
}
6 changes: 1 addition & 5 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
{
"name": "@embroider/addon-blueprint",
"isBaseBlueprint": true,
"options": [
"--ci-provider=github",
"--typescript",
"--yarn"
]
"options": ["--ci-provider=github", "--typescript", "--yarn"]
}
]
}
Expand Down
17 changes: 4 additions & 13 deletions ember-slugify/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

module.exports = {
root: true,
Expand All @@ -7,11 +7,7 @@ module.exports = {
ecmaVersion: 'latest',
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended'],
env: {
browser: true,
},
Expand All @@ -30,12 +26,7 @@ module.exports = {
},
// node files
{
files: [
'./.eslintrc.cjs',
'./.prettierrc.cjs',
'./.template-lintrc.cjs',
'./addon-main.cjs',
],
files: ['./.eslintrc.cjs', './.prettierrc.cjs', './.template-lintrc.cjs', './addon-main.cjs'],
parserOptions: {
sourceType: 'script',
},
Expand All @@ -47,4 +38,4 @@ module.exports = {
extends: ['plugin:n/recommended'],
},
],
};
}
4 changes: 2 additions & 2 deletions ember-slugify/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
'use strict'

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
semi: false,
singleQuote: true,
};
}
4 changes: 2 additions & 2 deletions ember-slugify/.template-lintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
'use strict'

module.exports = {
extends: 'recommended',
};
}
6 changes: 3 additions & 3 deletions ember-slugify/addon-main.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

const { addonV1Shim } = require('@embroider/addon-shim');
module.exports = addonV1Shim(__dirname);
const { addonV1Shim } = require('@embroider/addon-shim')
module.exports = addonV1Shim(__dirname)
16 changes: 11 additions & 5 deletions ember-slugify/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"plugins": [
["@babel/plugin-transform-typescript", { "allExtensions": true, "onlyRemoveTypeImports": true, "allowDeclareFields": true }],
[
"@babel/plugin-transform-typescript",
{ "allExtensions": true, "onlyRemoveTypeImports": true, "allowDeclareFields": true }
],
"@embroider/addon-dev/template-colocation-plugin",
"@babel/plugin-transform-class-static-block",
["babel-plugin-ember-template-compilation", {
"targetFormat": "hbs",
"transforms": []
}],
[
"babel-plugin-ember-template-compilation",
{
"targetFormat": "hbs",
"transforms": []
}
],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-proposal-class-properties"
]
Expand Down
10 changes: 5 additions & 5 deletions ember-slugify/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { babel } from '@rollup/plugin-babel';
import copy from 'rollup-plugin-copy';
import { Addon } from '@embroider/addon-dev/rollup';
import { babel } from '@rollup/plugin-babel'
import copy from 'rollup-plugin-copy'
import { Addon } from '@embroider/addon-dev/rollup'

const addon = new Addon({
srcDir: 'src',
destDir: 'dist',
});
})

export default {
// This provides defaults that work well alongside `publicEntrypoints` below.
Expand Down Expand Up @@ -64,4 +64,4 @@ export default {
],
}),
],
};
}
4 changes: 2 additions & 2 deletions ember-slugify/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export default function slugifyFunction(str = '', options = {}) {
options,
{
locale,
}
)
},
),
)
}

Expand Down
5 changes: 1 addition & 4 deletions ember-slugify/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "@tsconfig/ember/tsconfig.json",
"include": [
"src/**/*",
"unpublished-development-types/**/*"
],
"include": ["src/**/*", "unpublished-development-types/**/*"],
"glint": {
"environment": ["ember-loose", "ember-template-imports"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
declare module 'emoji.json';
declare module 'emoji.json'
2 changes: 1 addition & 1 deletion ember-slugify/unpublished-development-types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Add any types here that you need for local development only.
// These will *not* be published as part of your addon, so be careful that your published code does not rely on them!

import '@glint/environment-ember-loose';
import '@glint/environment-ember-loose'

declare module '@glint/environment-ember-loose/registry' {
// Remove this once entries have been added! 👇
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
declare module 'simple-pinyin';
declare module 'simple-pinyin'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
"ember-slugify",
"test-app"
]
}
}
10 changes: 3 additions & 7 deletions test-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

module.exports = {
root: true,
Expand All @@ -7,11 +7,7 @@ module.exports = {
ecmaVersion: 'latest',
},
plugins: ['ember', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended'],
env: {
browser: true,
},
Expand Down Expand Up @@ -54,4 +50,4 @@ module.exports = {
extends: ['plugin:qunit/recommended'],
},
],
};
}
4 changes: 2 additions & 2 deletions test-app/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

module.exports = {
overrides: [
Expand All @@ -10,4 +10,4 @@ module.exports = {
},
},
],
};
}
4 changes: 2 additions & 2 deletions test-app/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
'use strict'

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
}
4 changes: 2 additions & 2 deletions test-app/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
'use strict'

module.exports = {
extends: 'recommended',
};
}
44 changes: 22 additions & 22 deletions test-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,51 @@ A short introduction of this app could easily go here.

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [Ember CLI](https://cli.emberjs.com/release/)
* [Google Chrome](https://google.com/chrome/)
- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/)
- [Yarn](https://yarnpkg.com/)
- [Ember CLI](https://cli.emberjs.com/release/)
- [Google Chrome](https://google.com/chrome/)

## Installation

* `git clone <repository-url>` this repository
* `cd test-app`
* `yarn install`
- `git clone <repository-url>` this repository
- `cd test-app`
- `yarn install`

## Running / Development

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
- `ember serve`
- Visit your app at [http://localhost:4200](http://localhost:4200).
- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Code Generators

Make use of the many generators for code, try `ember help generate` for more details

### Running Tests

* `ember test`
* `ember test --server`
- `ember test`
- `ember test --server`

### Linting

* `yarn lint`
* `yarn lint:fix`
- `yarn lint`
- `yarn lint:fix`

### Building

* `ember build` (development)
* `ember build --environment production` (production)
- `ember build` (development)
- `ember build --environment production` (production)

### Deploying

Specify what it takes to deploy your app.

## Further Reading / Useful Links

* [ember.js](https://emberjs.com/)
* [ember-cli](https://cli.emberjs.com/release/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
- [ember.js](https://emberjs.com/)
- [ember-cli](https://cli.emberjs.com/release/)
- Development Browser Extensions
- [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
- [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
16 changes: 8 additions & 8 deletions test-app/app/app.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'test-app/config/environment';
import Application from '@ember/application'
import Resolver from 'ember-resolver'
import loadInitializers from 'ember-load-initializers'
import config from 'test-app/config/environment'

export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
modulePrefix = config.modulePrefix
podModulePrefix = config.podModulePrefix
Resolver = Resolver
}

loadInitializers(App, config.modulePrefix);
loadInitializers(App, config.modulePrefix)
Loading

0 comments on commit 0ef27d7

Please sign in to comment.