diff --git a/ember-scoped-css/.eslintrc.cjs b/ember-scoped-css/.eslintrc.cjs index 0212678f..f3638ad2 100644 --- a/ember-scoped-css/.eslintrc.cjs +++ b/ember-scoped-css/.eslintrc.cjs @@ -1,6 +1,6 @@ -"use strict"; +'use strict'; -const { configs } = require("@nullvoxpopuli/eslint-configs"); +const { configs } = require('@nullvoxpopuli/eslint-configs'); const nodeESM = configs.node(); @@ -10,12 +10,12 @@ module.exports = { ...nodeESM.overrides, { - files: ["./test/**/*.js"], + files: ['./test/**/*.js'], env: { mocha: true, }, rules: { - "node/no-unpublished-import": 0, + 'node/no-unpublished-import': 0, }, }, ], diff --git a/ember-scoped-css/.prettierrc.cjs b/ember-scoped-css/.prettierrc.cjs index 3401f9a7..324b444b 100644 --- a/ember-scoped-css/.prettierrc.cjs +++ b/ember-scoped-css/.prettierrc.cjs @@ -1,9 +1,9 @@ -"use strict"; +'use strict'; module.exports = { overrides: [ { - files: "*.{js,ts}", + files: '*.{js,ts,cjs,mjs,mts,cts,gts.gjs}', options: { singleQuote: true, }, diff --git a/ember-scoped-css/src/ember-addon-main.cjs b/ember-scoped-css/src/ember-addon-main.cjs index f2893eda..4f898f7e 100644 --- a/ember-scoped-css/src/ember-addon-main.cjs +++ b/ember-scoped-css/src/ember-addon-main.cjs @@ -1,11 +1,11 @@ -"use strict"; +'use strict'; const { default: ScopedCssPreprocessor, -} = require("../dist/lib/scoped-css-preprocessor.cjs"); +} = require('../dist/lib/scoped-css-preprocessor.cjs'); module.exports = { - name: "ember-scoped-css", + name: 'ember-scoped-css', init() { this._super.init && this._super.init.apply(this, arguments); @@ -27,7 +27,7 @@ module.exports = { if (htmlbarsPlugin) { let htmlbarsPluginIndex = plugins.indexOf(htmlbarsPlugin); - let customPlugin = [require.resolve("../dist/scoped-babel-plugin.cjs")]; + let customPlugin = [require.resolve('../dist/scoped-babel-plugin.cjs')]; plugins.splice(htmlbarsPluginIndex, 0, customPlugin); } @@ -36,16 +36,16 @@ module.exports = { setupPreprocessorRegistry(type, registry) { // Skip if we're setting up this addon's own registry - if (type !== "parent") { + if (type !== 'parent') { return; } // we need to run our css preprocessor first, so we removed all other from the registry and run them as part of our preprocessor // we did not find other way how to do it more elegantly - let preprocessors = registry.load("css"); + let preprocessors = registry.load('css'); - preprocessors.forEach((p) => registry.remove("css", p)); + preprocessors.forEach((p) => registry.remove('css', p)); this.outputStylePreprocessor.preprocessors = preprocessors; - registry.add("css", this.outputStylePreprocessor); + registry.add('css', this.outputStylePreprocessor); }, }; diff --git a/test-apps/classic-app/.prettierrc.js b/test-apps/classic-app/.prettierrc.js index e5f7b6d1..324b444b 100644 --- a/test-apps/classic-app/.prettierrc.js +++ b/test-apps/classic-app/.prettierrc.js @@ -3,7 +3,7 @@ module.exports = { overrides: [ { - files: '*.{js,ts}', + files: '*.{js,ts,cjs,mjs,mts,cts,gts.gjs}', options: { singleQuote: true, }, diff --git a/test-apps/embroider-app/.prettierrc.js b/test-apps/embroider-app/.prettierrc.js index e5f7b6d1..324b444b 100644 --- a/test-apps/embroider-app/.prettierrc.js +++ b/test-apps/embroider-app/.prettierrc.js @@ -3,7 +3,7 @@ module.exports = { overrides: [ { - files: '*.{js,ts}', + files: '*.{js,ts,cjs,mjs,mts,cts,gts.gjs}', options: { singleQuote: true, }, diff --git a/test-apps/v2-addon/.eslintrc.cjs b/test-apps/v2-addon/.eslintrc.cjs index 270745e0..35b0e21d 100644 --- a/test-apps/v2-addon/.eslintrc.cjs +++ b/test-apps/v2-addon/.eslintrc.cjs @@ -1,6 +1,6 @@ -"use strict"; +'use strict'; -const { configs } = require("@nullvoxpopuli/eslint-configs"); +const { configs } = require('@nullvoxpopuli/eslint-configs'); const ember = configs.ember(); diff --git a/test-apps/v2-addon/.prettierrc.cjs b/test-apps/v2-addon/.prettierrc.cjs index 3401f9a7..324b444b 100644 --- a/test-apps/v2-addon/.prettierrc.cjs +++ b/test-apps/v2-addon/.prettierrc.cjs @@ -1,9 +1,9 @@ -"use strict"; +'use strict'; module.exports = { overrides: [ { - files: "*.{js,ts}", + files: '*.{js,ts,cjs,mjs,mts,cts,gts.gjs}', options: { singleQuote: true, }, diff --git a/test-apps/v2-addon/.template-lintrc.cjs b/test-apps/v2-addon/.template-lintrc.cjs index d1311e11..f35f61c7 100644 --- a/test-apps/v2-addon/.template-lintrc.cjs +++ b/test-apps/v2-addon/.template-lintrc.cjs @@ -1,5 +1,5 @@ -"use strict"; +'use strict'; module.exports = { - extends: "recommended", + extends: 'recommended', }; diff --git a/test-apps/v2-addon/addon-main.cjs b/test-apps/v2-addon/addon-main.cjs index 07684a92..d36b0c86 100644 --- a/test-apps/v2-addon/addon-main.cjs +++ b/test-apps/v2-addon/addon-main.cjs @@ -1,5 +1,5 @@ -"use strict"; +'use strict'; -const { addonV1Shim } = require("@embroider/addon-shim"); +const { addonV1Shim } = require('@embroider/addon-shim'); module.exports = addonV1Shim(__dirname); diff --git a/test-apps/v2-addon/rollup.config.mjs b/test-apps/v2-addon/rollup.config.mjs index f64fc751..a10fc701 100644 --- a/test-apps/v2-addon/rollup.config.mjs +++ b/test-apps/v2-addon/rollup.config.mjs @@ -1,12 +1,12 @@ -import { babel } from "@rollup/plugin-babel"; -import copy from "rollup-plugin-copy"; -import { Addon } from "@embroider/addon-dev/rollup"; -import { glimmerTemplateTag } from "rollup-plugin-glimmer-template-tag"; -import { scopedCssUnplugin } from "ember-scoped-css"; +import { babel } from '@rollup/plugin-babel'; +import copy from 'rollup-plugin-copy'; +import { Addon } from '@embroider/addon-dev/rollup'; +import { glimmerTemplateTag } from 'rollup-plugin-glimmer-template-tag'; +import { scopedCssUnplugin } from 'ember-scoped-css'; const addon = new Addon({ - srcDir: "src", - destDir: "dist", + srcDir: 'src', + destDir: 'dist', }); export default { @@ -17,12 +17,12 @@ export default { plugins: [ // These are the modules that users should be able to import from your // addon. Anything not listed here may get optimized away. - addon.publicEntrypoints(["components/**/*.js", "index.js"]), + addon.publicEntrypoints(['components/**/*.js', 'index.js']), // These are the modules that should get reexported into the traditional // "app" tree. Things in here should also be in publicEntrypoints above, but // not everything in publicEntrypoints necessarily needs to go here. - addon.appReexports(["components/**/*.js"]), + addon.appReexports(['components/**/*.js']), // Follow the V2 Addon rules about dependencies. Your code can import from // `dependencies` and `peerDependencies` as well as standard Ember-provided @@ -37,8 +37,8 @@ export default { // By default, this will load the actual babel config from the file // babel.config.json. babel({ - babelHelpers: "bundled", - extensions: [".js", ".ts", ".gjs", ".gts"], + babelHelpers: 'bundled', + extensions: ['.js', '.ts', '.gjs', '.gts'], }), // Ensure that standalone .hbs files are properly integrated as Javascript. @@ -57,8 +57,8 @@ export default { // Copy Readme and License into published package copy({ targets: [ - { src: "../README.md", dest: "." }, - { src: "../LICENSE.md", dest: "." }, + { src: '../README.md', dest: '.' }, + { src: '../LICENSE.md', dest: '.' }, ], }), ],