Skip to content

Commit

Permalink
Add more extensions to the prettierrc
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jun 9, 2023
1 parent 87020a6 commit 975a3e1
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions ember-scoped-css/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
'use strict';

const { configs } = require("@nullvoxpopuli/eslint-configs");
const { configs } = require('@nullvoxpopuli/eslint-configs');

const nodeESM = configs.node();

Expand All @@ -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,
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions ember-scoped-css/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -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,
},
Expand Down
16 changes: 8 additions & 8 deletions ember-scoped-css/src/ember-addon-main.cjs
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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);
}
Expand All @@ -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);
},
};
2 changes: 1 addition & 1 deletion test-apps/classic-app/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module.exports = {
overrides: [
{
files: '*.{js,ts}',
files: '*.{js,ts,cjs,mjs,mts,cts,gts.gjs}',
options: {
singleQuote: true,
},
Expand Down
2 changes: 1 addition & 1 deletion test-apps/embroider-app/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module.exports = {
overrides: [
{
files: '*.{js,ts}',
files: '*.{js,ts,cjs,mjs,mts,cts,gts.gjs}',
options: {
singleQuote: true,
},
Expand Down
4 changes: 2 additions & 2 deletions test-apps/v2-addon/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
'use strict';

const { configs } = require("@nullvoxpopuli/eslint-configs");
const { configs } = require('@nullvoxpopuli/eslint-configs');

const ember = configs.ember();

Expand Down
4 changes: 2 additions & 2 deletions test-apps/v2-addon/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -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,
},
Expand Down
4 changes: 2 additions & 2 deletions test-apps/v2-addon/.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",
extends: 'recommended',
};
4 changes: 2 additions & 2 deletions test-apps/v2-addon/addon-main.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
'use strict';

const { addonV1Shim } = require("@embroider/addon-shim");
const { addonV1Shim } = require('@embroider/addon-shim');

module.exports = addonV1Shim(__dirname);
26 changes: 13 additions & 13 deletions test-apps/v2-addon/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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: '.' },
],
}),
],
Expand Down

0 comments on commit 975a3e1

Please sign in to comment.