Skip to content

Commit 8db100b

Browse files
ember-cli-update to 6.2.3 (#1692)
* ember-cli-update to 6.2.3 * Fix lint * Use @nullvoxpopuli/ember-composable-helpers * Update environment.js * Update package.json * Bump some deps * Update some things
1 parent d8f31a3 commit 8db100b

26 files changed

Lines changed: 1516 additions & 1308 deletions

.eslintignore

Lines changed: 0 additions & 17 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 94 deletions
This file was deleted.

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
/.ember-cli
88
/.env*
99
/.eslintcache
10-
/.eslintignore
11-
/.eslintrc.js
1210
/.git/
1311
/.github/
1412
/.gitignore
@@ -20,6 +18,7 @@
2018
/.watchmanconfig
2119
/CONTRIBUTING.md
2220
/ember-cli-build.js
21+
/eslint.config.mjs
2322
/testem.js
2423
/tests/
2524
/tsconfig.declarations.json

.prettierrc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
'use strict';
22

33
module.exports = {
4+
plugins: ['prettier-plugin-ember-template-tag'],
45
overrides: [
56
{
6-
files: '*.{js,ts}',
7+
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
78
options: {
89
singleQuote: true,
910
},
1011
},
12+
{
13+
files: '*.{gjs,gts}',
14+
options: {
15+
singleQuote: true,
16+
templateSingleQuote: false,
17+
},
18+
},
1119
],
1220
};

.template-lintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module.exports = {
55
rules: {
66
// TODO: fix these and enable octane
77
'no-action': false,
8+
'no-at-ember-render-modifiers': false,
9+
'no-builtin-form-components': false,
810
'no-curly-component-invocation': false,
911
'no-implicit-this': false,
1012
'no-inline-styles': false,

blueprints/docs-page/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-env node */
21
const path = require('path');
32
const fs = require('fs');
43
const chalk = require('chalk');
@@ -11,6 +10,7 @@ const DUMMY_APP_PATH = path.join('tests', 'dummy', 'app');
1110
function dedasherize(str) {
1211
let dedasherized = str.replace(/-/g, ' ');
1312

13+
// eslint-disable-next-line ember/no-string-prototype-extensions
1414
return stringUtil.capitalize(dedasherized);
1515
}
1616

config/deploy.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-env node */
2-
31
module.exports = function (deployTarget) {
42
let ENV = {
53
build: {},

eslint.config.mjs

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
/**
2+
* Debugging:
3+
* https://eslint.org/docs/latest/use/configure/debug
4+
* ----------------------------------------------------
5+
*
6+
* Print a file's calculated configuration
7+
*
8+
* npx eslint --print-config path/to/file.js
9+
*
10+
* Inspecting the config
11+
*
12+
* npx eslint --inspect-config
13+
*
14+
*/
15+
import globals from 'globals';
16+
import js from '@eslint/js';
17+
18+
import ember from 'eslint-plugin-ember/recommended';
19+
import prettier from 'eslint-plugin-prettier/recommended';
20+
import qunit from 'eslint-plugin-qunit';
21+
import n from 'eslint-plugin-n';
22+
23+
import babelParser from '@babel/eslint-parser';
24+
25+
const esmParserOptions = {
26+
ecmaFeatures: { modules: true },
27+
ecmaVersion: 'latest',
28+
requireConfigFile: false,
29+
babelOptions: {
30+
plugins: [
31+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
32+
],
33+
},
34+
};
35+
36+
export default [
37+
js.configs.recommended,
38+
prettier,
39+
ember.configs.base,
40+
ember.configs.gjs,
41+
/**
42+
* Ignores must be in their own object
43+
* https://eslint.org/docs/latest/use/configure/ignore
44+
*/
45+
{
46+
ignores: [
47+
'dist/',
48+
'node_modules/',
49+
'coverage/',
50+
'test-apps/',
51+
'tmp/',
52+
'!**/.*',
53+
],
54+
},
55+
/**
56+
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
57+
*/
58+
{
59+
linterOptions: {
60+
reportUnusedDisableDirectives: 'error',
61+
},
62+
},
63+
{
64+
files: ['**/*.js'],
65+
languageOptions: {
66+
parser: babelParser,
67+
},
68+
},
69+
{
70+
files: ['**/*.{js,gjs}'],
71+
languageOptions: {
72+
parserOptions: esmParserOptions,
73+
globals: {
74+
...globals.browser,
75+
server: true,
76+
},
77+
},
78+
rules: {
79+
'no-unused-vars': ['error', { args: 'none' }],
80+
'no-console': ['error', { allow: ['warn', 'error'] }],
81+
'ember/no-incorrect-calls-with-inline-anonymous-functions': 'off',
82+
'ember/require-return-from-computed': 'off',
83+
'ember/no-jquery': 'error',
84+
85+
// TODO: enable these rules
86+
'ember/classic-decorator-no-classic-methods': 'off',
87+
'ember/no-classic-classes': 'off',
88+
'ember/no-classic-components': 'off',
89+
'ember/no-component-lifecycle-hooks': 'off',
90+
'ember/no-computed-properties-in-native-classes': 'off',
91+
'ember/no-private-routing-service': 'off',
92+
'ember/no-runloop': 'off',
93+
},
94+
},
95+
{
96+
files: ['tests/**/*-test.{js,gjs}'],
97+
plugins: {
98+
qunit,
99+
},
100+
},
101+
/**
102+
* CJS node files
103+
*/
104+
{
105+
files: [
106+
'**/*.cjs',
107+
'blueprints/*/index.js',
108+
'config/**/*.js',
109+
'lib/**/*.js',
110+
'sandbox/index.js',
111+
'tests/dummy/config/**/*.js',
112+
'testem.js',
113+
'testem*.js',
114+
'.prettierrc.js',
115+
'.stylelintrc.js',
116+
'.template-lintrc.js',
117+
'**/addon-docs.js',
118+
'ember-cli-build.js',
119+
'index.js',
120+
],
121+
plugins: {
122+
n,
123+
},
124+
125+
languageOptions: {
126+
sourceType: 'script',
127+
ecmaVersion: 'latest',
128+
globals: {
129+
...globals.node,
130+
},
131+
},
132+
},
133+
/**
134+
* Node test files (mocha)
135+
*/
136+
{
137+
files: ['tests-node/**/*.js'],
138+
plugins: {
139+
n,
140+
},
141+
142+
languageOptions: {
143+
sourceType: 'script',
144+
ecmaVersion: 'latest',
145+
globals: {
146+
...globals.node,
147+
...globals.mocha,
148+
},
149+
},
150+
},
151+
/**
152+
* ESM node files
153+
*/
154+
{
155+
files: ['**/*.mjs'],
156+
plugins: {
157+
n,
158+
},
159+
160+
languageOptions: {
161+
sourceType: 'module',
162+
ecmaVersion: 'latest',
163+
parserOptions: esmParserOptions,
164+
globals: {
165+
...globals.node,
166+
},
167+
},
168+
},
169+
];

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const path = require('path');
55
const UnwatchedDir = require('broccoli-source').UnwatchedDir;
66
const MergeTrees = require('broccoli-merge-trees');
77
const Funnel = require('broccoli-funnel');
8-
const EmberApp = require('ember-cli/lib/broccoli/ember-app'); // eslint-disable-line n/no-unpublished-require
9-
const Plugin = require('broccoli-plugin');
8+
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
9+
const BroccoliPlugin = require('broccoli-plugin');
1010
const walkSync = require('walk-sync');
1111

1212
const LATEST_VERSION_NAME = '-latest';
@@ -463,7 +463,7 @@ function generateDefaultProject(parentAddon, addonSrcFolder) {
463463
return new MergeTrees(includeFunnels);
464464
}
465465

466-
class FindDummyAppFiles extends Plugin {
466+
class FindDummyAppFiles extends BroccoliPlugin {
467467
build() {
468468
let addonPath = this.inputPaths[0];
469469
let paths = walkSync(addonPath, { directories: false });
@@ -476,7 +476,7 @@ class FindDummyAppFiles extends Plugin {
476476
}
477477
}
478478

479-
class FindAddonFiles extends Plugin {
479+
class FindAddonFiles extends BroccoliPlugin {
480480
build() {
481481
let addonPath = this.inputPaths[0];
482482
let paths = addonPath ? walkSync(addonPath, { directories: false }) : [];

lib/utils/find-and-replace-in-directory.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-console */
2-
31
'use strict';
42

53
const fs = require('fs-extra');

0 commit comments

Comments
 (0)