Skip to content

Commit

Permalink
Merge pull request #1027 from bertdeblock/update-lint-setup
Browse files Browse the repository at this point in the history
Update lint setup
  • Loading branch information
bertdeblock authored Dec 13, 2024
2 parents 19831ac + 5daae62 commit 324be12
Show file tree
Hide file tree
Showing 17 changed files with 268 additions and 276 deletions.
12 changes: 6 additions & 6 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ engines:
enabled: true
ratings:
paths:
- "**.js"
- '**.js'
exclude_paths:
- config/
- app/
- addon/
- tests/
- vendor/
- config/
- app/
- addon/
- tests/
- vendor/
59 changes: 12 additions & 47 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,19 @@
module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:n/recommended', 'prettier'],
overrides: [
{
env: { mocha: true },
files: ['test/**/*.js'],
},
],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
requireConfigFile: false,
sourceType: 'module'
sourceType: 'script',
},
root: true,
rules: {
'n/no-process-exit': 'off',
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
],
rules: {},
overrides: [
// node files
{
files: [
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'test/**/*.js',
'lib/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2018
},
env: {
browser: false,
node: true
},
extends: ['plugin:node/recommended'],
rules: {
// add your custom rules and overrides for node files here
'no-process-exit': 'off'
}
},
// test files
{
env: { mocha: true },
files: ['test/**/*.js'],
}
]
};
175 changes: 86 additions & 89 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,88 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: wednesday
time: "03:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: ember-cli
versions:
- 3.24.0
- 3.25.0
- 3.25.1
- 3.25.2
- 3.25.3
- 3.26.0
- dependency-name: eslint
versions:
- 7.18.0
- 7.19.0
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- dependency-name: eslint-config-prettier
versions:
- 7.2.0
- 8.0.0
- 8.1.0
- 8.2.0
- dependency-name: release-it
versions:
- 14.2.2
- 14.3.0
- 14.4.0
- 14.4.1
- 14.5.0
- 14.5.1
- dependency-name: y18n
versions:
- 4.0.1
- 4.0.2
- dependency-name: eslint-plugin-prettier
versions:
- 3.3.1
- dependency-name: fs-extra
update-types: ["version-update:semver-major"]
- package-ecosystem: npm
directory: "/smoke-test-app"
schedule:
interval: weekly
day: wednesday
time: "03:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: ember-cli
versions:
- 3.24.0
- 3.25.0
- 3.25.1
- 3.25.2
- 3.25.3
- 3.26.0
- dependency-name: y18n
versions:
- 4.0.1
- 4.0.2
- dependency-name: ember-cli-babel
versions:
- 7.23.1
- 7.26.2
- dependency-name: ember-source
versions:
- 3.24.1
- 3.25.0
- 3.25.1
- 3.25.3
- 3.26.0
- dependency-name: ember-cli-htmlbars
versions:
- 5.3.2
- 5.6.2
- 5.6.4
- 5.6.5
- dependency-name: ember-data
versions:
- 3.24.0
- 3.25.0
- package-ecosystem: npm
directory: '/'
schedule:
interval: weekly
day: wednesday
time: '03:00'
open-pull-requests-limit: 10
ignore:
- dependency-name: ember-cli
versions:
- 3.24.0
- 3.25.0
- 3.25.1
- 3.25.2
- 3.25.3
- 3.26.0
- dependency-name: eslint
versions:
- 7.18.0
- 7.19.0
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- dependency-name: eslint-config-prettier
versions:
- 7.2.0
- 8.0.0
- 8.1.0
- 8.2.0
- dependency-name: release-it
versions:
- 14.2.2
- 14.3.0
- 14.4.0
- 14.4.1
- 14.5.0
- 14.5.1
- dependency-name: y18n
versions:
- 4.0.1
- 4.0.2
- dependency-name: fs-extra
update-types: ['version-update:semver-major']
- package-ecosystem: npm
directory: '/smoke-test-app'
schedule:
interval: weekly
day: wednesday
time: '03:00'
open-pull-requests-limit: 10
ignore:
- dependency-name: ember-cli
versions:
- 3.24.0
- 3.25.0
- 3.25.1
- 3.25.2
- 3.25.3
- 3.26.0
- dependency-name: y18n
versions:
- 4.0.1
- 4.0.2
- dependency-name: ember-cli-babel
versions:
- 7.23.1
- 7.26.2
- dependency-name: ember-source
versions:
- 3.24.1
- 3.25.0
- 3.25.1
- 3.25.3
- 3.26.0
- dependency-name: ember-cli-htmlbars
versions:
- 5.3.2
- 5.6.2
- 5.6.4
- 5.6.5
- dependency-name: ember-data
versions:
- 3.24.0
- 3.25.0
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run: yarn install
- run: yarn lint
test:
name: "Tests"
name: 'Tests'
runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -46,9 +46,8 @@ jobs:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}


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

Expand Down Expand Up @@ -178,7 +177,7 @@ jobs:
- name: install smoke-test-app deps
run: npm install
working-directory: smoke-test-app
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
working-directory: smoke-test-app

yarn-smoke-tests:
Expand Down Expand Up @@ -206,7 +205,7 @@ jobs:
- name: install smoke-test-app deps
run: yarn install
working-directory: smoke-test-app
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-yarn-scenarios.js'
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-yarn-scenarios.js'
working-directory: smoke-test-app

windows-smoke-tests:
Expand All @@ -229,5 +228,5 @@ jobs:
- name: install smoke-test-app deps
run: npm install
working-directory: smoke-test-app
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
working-directory: smoke-test-app
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/testem.log
/yarn-error.log

/.eslintcache
/.nyc_output
*.tgz
.scratch
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/CHANGELOG.md
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ or
```

When running in a CI environment where changes are discarded you can skip resetting your environment back to its original state by specifying --skip-cleanup=true as an option to ember try.
*Warning: If you use this option and, without cleaning up, build and deploy as the result of a passing test suite, it will build with the last set of dependencies ember try was run with.*
_Warning: If you use this option and, without cleaning up, build and deploy as the result of a passing test suite, it will build with the last set of dependencies ember try was run with._

```
ember try:one ember-beta --skip-cleanup=true --- ember test
Expand All @@ -74,6 +74,7 @@ Displays the configuration that will be used. Also takes an optional `--config-p
### Config

##### versionCompatibility

If you're using `ember-try` with an Ember addon, there is a short cut to test many Ember versions. In your `package.json` under the `ember-addon` key, add the following:

```json
Expand Down Expand Up @@ -226,6 +227,7 @@ in `package.json`, allowing you to try scenarios in monorepo style repositories.
[Yarn's documentation of workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) for more details.

### Video

[![How to use EmberTry](https://i.vimeocdn.com/video/559399937_500.jpg)](https://vimeo.com/157688157)

See an example of using `ember-try` for CI [here](https://github.com/kategengler/ember-feature-flags/commit/aaf0226975c76630c875cf6b923fdc23b025aa79), and the resulting build [output](https://travis-ci.org/kategengler/ember-feature-flags/builds/55597086).
Expand All @@ -234,7 +236,6 @@ See an example of using `ember-try` for CI [here](https://github.com/kategengler

- Much credit is due to [Edward Faulkner](https://github.com/ef4) The scripts in [liquid-fire](https://github.com/ef4/liquid-fire) that test against multiple ember versions were the inspiration for this project.


### Developing

- Be sure to run `npm link` and `npm link ember-try`, otherwise any `ember try` commands you run will use the version of ember-try included by ember-cli itself.
16 changes: 8 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
- breaking - Used when the PR is considered a breaking change.
- enhancement - Used when the PR adds a new feature or enhancement.
- bug - Used when the PR fixes a bug included in a previous release.
- documentation - Used when the PR adds or updates documentation.
- internal - Used for internal changes that still require a mention in the
changelog/release notes.

## Release

Once the prep work is completed, the actual release is straight forward:

* First, ensure that you have installed your projects dependencies:
- First, ensure that you have installed your projects dependencies:

```sh
yarn install
```

* Second, ensure that you have obtained a
- Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.
Expand All @@ -47,7 +47,7 @@ yarn install

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable

* And last (but not least 😁) do your release.
- And last (but not least 😁) do your release.

```sh
npx release-it
Expand Down
Loading

0 comments on commit 324be12

Please sign in to comment.