Skip to content

Commit

Permalink
Updated dependencies (#227)
Browse files Browse the repository at this point in the history
* chore: Updated dependencies

* chore: Updated ember-source to v5.8.0

* chore: Added lockfile

* chore: Temporarily hardcoded versions for ember-beta and ember-canary

* chore: Reconfigured eslint to be compatible with eslint-plugin-ember@v12

* chore: Ignored ember/no-runloop

* bugfix: Created a local helper to render $ character (can't be parsed by [email protected])

---------

Co-authored-by: ijlee2 <[email protected]>
  • Loading branch information
ijlee2 and ijlee2 authored Apr 22, 2024
1 parent 8471e4a commit c5a182f
Show file tree
Hide file tree
Showing 25 changed files with 2,314 additions and 2,595 deletions.
2 changes: 1 addition & 1 deletion configs/ember-template-lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prettier": "^3.2.5"
},
"peerDependencies": {
"ember-template-lint": "^5.13.0"
"ember-template-lint": "^6.0.0"
},
"peerDependenciesMeta": {
"ember-template-lint": {
Expand Down
22 changes: 16 additions & 6 deletions configs/eslint/ember/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
},
},
overrides: [
// TypeScript files
// Ember files
{
files: ['**/*.{gts,ts}'],
extends: [
Expand All @@ -52,7 +52,16 @@ module.exports = {
'@typescript-eslint/no-import-type-side-effects': 'error',
},
},
// TypeScript and JavaScript files
{
files: ['**/*.gts'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gts'],
},
{
files: ['**/*.gjs'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gjs'],
},
{
files: ['**/*.{gjs,gts,js,ts}'],
rules: {
Expand All @@ -66,13 +75,14 @@ module.exports = {
// Node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./.eslintrc.{cjs,js}',
'./.prettierrc.{cjs,js}',
'./.stylelintrc.{cjs,js}',
'./.template-lintrc.{cjs,js}',
'./ember-cli-build.js',
'./postcss.config.js',
'./testem.js',
'./vite.config.{js,mjs}',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/*/index.js',
Expand Down
26 changes: 15 additions & 11 deletions configs/eslint/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,48 @@
"url": "https://github.com/ijlee2/ember-container-query.git"
},
"author": "Isaac J. Lee",
"main": "addon/index.js",
"main": "app/index.js",
"scripts": {
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:js": "prettier --check \"**/*.js\"",
"lint:js:fix": "prettier --write \"**/*.js\""
},
"dependencies": {
"@rushstack/eslint-patch": "^1.7.2",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@rushstack/eslint-patch": "^1.10.2",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-ember": "^11.12.0",
"eslint-plugin-ember": "^12.0.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-n": "^17.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-qunit": "^8.1.1",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-typescript-sort-keys": "^3.1.0"
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-typescript-sort-keys": "^3.2.0"
},
"devDependencies": {
"@shared-configs/eslint-config-node": "workspace:*",
"@shared-configs/prettier": "workspace:*",
"concurrently": "^8.2.2",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"prettier": "^3.2.5"
},
"peerDependencies": {
"eslint": "^8.56.0",
"prettier": "^3.2.5"
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"typescript": "^5.4.5"
},
"peerDependenciesMeta": {
"eslint": {
"optional": false
},
"prettier": {
"optional": false
},
"typescript": {
"optional": true
}
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion configs/eslint/ember/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* require('@shared-configs/eslint-config-ember/patch');
*
* module.exports = {
* extends: ['@shared-configs/eslint-config-ember/addon'],
* extends: ['@shared-configs/eslint-config-ember/v2-addon'],
* };
* ```
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
},
},
overrides: [
// TypeScript files
// Ember files
{
files: ['**/*.{gts,ts}'],
extends: [
Expand All @@ -52,7 +52,16 @@ module.exports = {
'@typescript-eslint/no-import-type-side-effects': 'error',
},
},
// TypeScript and JavaScript files
{
files: ['**/*.gts'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gts'],
},
{
files: ['**/*.gjs'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gjs'],
},
{
files: ['**/*.{gjs,gts,js,ts}'],
rules: {
Expand All @@ -63,7 +72,7 @@ module.exports = {
],
},
},
// Node files (v1 addon)
// Node files
{
files: [
'./.eslintrc.js',
Expand All @@ -83,23 +92,6 @@ module.exports = {
},
extends: ['plugin:n/recommended'],
},
// Node files (v2 addon)
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./addon-main.cjs',
'./blueprints/*/index.js',
'./rollup.config.mjs',
],
env: {
browser: false,
node: true,
},
extends: ['plugin:n/recommended'],
},
// Test files
{
files: ['tests/**/*-test.{gjs,gts,js,ts}'],
Expand Down
105 changes: 105 additions & 0 deletions configs/eslint/ember/v2-addon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
'use strict';

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'ember',
'@typescript-eslint',
'simple-import-sort',
'typescript-sort-keys',
],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:prettier/recommended',
'plugin:typescript-sort-keys/recommended',
],
env: {
browser: true,
},
rules: {
curly: 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.gjs', '.gts', '.js', '.ts'],
},
typescript: true,
},
},
overrides: [
// Ember files
{
files: ['**/*.{gts,ts}'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-import-type-side-effects': 'error',
},
},
{
files: ['**/*.gts'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gts'],
},
{
files: ['**/*.gjs'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gjs'],
},
{
files: ['**/*.{gjs,gts,js,ts}'],
rules: {
'import/no-duplicates': 'error',
'import/no-unresolved': [
'error',
{ ignore: ['^@ember', '^dummy/', '^ember', 'fetch'] },
],
},
},
{
files: ['src/**/*.{gjs,gts,js,ts}'],
rules: {
'import/extensions': [
'error',
'always',
{
ignorePackages: true,
},
],
},
},
// Node files
{
files: [
'./.eslintrc.{cjs,js}',
'./.prettierrc.{cjs,js}',
'./.stylelintrc.{cjs,js}',
'./.template-lintrc.{cjs,js}',
'./addon-main.cjs',
'./blueprints/*/index.js',
'./rollup.config.mjs',
],
env: {
browser: false,
node: true,
},
extends: ['plugin:n/recommended'],
},
],
};
20 changes: 10 additions & 10 deletions configs/eslint/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@
"lint:js:fix": "prettier --write \"**/*.js\""
},
"dependencies": {
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "7.23.10",
"@rushstack/eslint-patch": "^1.7.2",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@babel/core": "^7.24.4",
"@babel/eslint-parser": "7.24.1",
"@rushstack/eslint-patch": "^1.10.2",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-n": "^17.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-typescript-sort-keys": "^3.1.0"
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-typescript-sort-keys": "^3.2.0"
},
"devDependencies": {
"@shared-configs/prettier": "workspace:*",
"concurrently": "^8.2.2",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"prettier": "^3.2.5"
},
"peerDependencies": {
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"prettier": "^3.2.5"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion configs/stylelint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"peerDependencies": {
"prettier": "^3.2.5",
"stylelint": "^16.2.1"
"stylelint": "^16.3.1"
},
"peerDependenciesMeta": {
"prettier": {
Expand Down
8 changes: 4 additions & 4 deletions configs/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
"lint:js:fix": "prettier --write \"**/*.js\""
},
"dependencies": {
"@tsconfig/ember": "^3.0.3",
"@tsconfig/node18": "^18.2.2",
"@tsconfig/strictest": "^2.0.3"
"@tsconfig/ember": "^3.0.6",
"@tsconfig/node18": "^18.2.4",
"@tsconfig/strictest": "^2.0.5"
},
"devDependencies": {
"@shared-configs/prettier": "workspace:*",
"concurrently": "^8.2.2",
"prettier": "^3.2.5"
},
"peerDependencies": {
"typescript": "^5.3.3"
"typescript": "^5.4.5"
},
"peerDependenciesMeta": {
"typescript": {
Expand Down
1 change: 1 addition & 0 deletions docs-app/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/blueprints/*/files/

# compiled output
/declarations/
/dist/

# misc
Expand Down
6 changes: 5 additions & 1 deletion docs-app/app/components/products/product/card.gts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import type { Product } from '../../../data';
import styles from './card.css';
import ProductsProductImage from './image';

function formatPrice(price: number): string {
return `$${price}`;
}

interface ProductsProductCardSignature {
Args: {
product: Product;
Expand Down Expand Up @@ -41,7 +45,7 @@ const ProductsProductCardComponent: TOC<ProductsProductCardSignature> =
</p>

<p class={{styles.price}} data-test-field="Price">
\${{@product.price}}
{{formatPrice @product.price}}
</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs-app/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "5.6.0",
"version": "5.8.0",
"blueprints": [
{
"name": "app",
Expand Down
Loading

0 comments on commit c5a182f

Please sign in to comment.