Skip to content

Commit

Permalink
update prettier-ification
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Nov 1, 2024
1 parent 3b0a276 commit d7da0d0
Show file tree
Hide file tree
Showing 129 changed files with 760 additions and 1,148 deletions.
10 changes: 5 additions & 5 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ engines:
enabled: true
config:
languages:
- javascript
- javascript
eslint:
enabled: true
fixme:
enabled: true
ratings:
paths:
- "**.js"
- "**.js"
exclude_paths:
- config/
- tests/
- vendor/
- config/
- tests/
- vendor/
29 changes: 4 additions & 25 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,12 @@ module.exports = {
ecmaVersion: 2018,
sourceType: 'module',
babelOptions: {
plugins: [
[
require.resolve('@babel/plugin-proposal-decorators'),
{ legacy: true },
],
],
plugins: [[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }]],
},
requireConfigFile: false,
},
plugins: [
'ember',
'qunit',
'simple-import-sort',
'import',
'unused-imports',
'unicorn',
'no-useless-assign',
],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:qunit/recommended',
'plugin:unicorn/recommended',
],
plugins: ['ember', 'qunit', 'simple-import-sort', 'import', 'unused-imports', 'unicorn', 'no-useless-assign'],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:qunit/recommended', 'plugin:unicorn/recommended'],
env: {
browser: true,
},
Expand Down Expand Up @@ -101,10 +83,7 @@ module.exports = {
],
*/
complexity: ['error', { max: 20 }],
'no-magic-numbers': [
'error',
{ ignore: [0, 1, -1], ignoreArrayIndexes: true },
],
'no-magic-numbers': ['error', { ignore: [0, 1, -1], ignoreArrayIndexes: true }],

'object-shorthand': ['error', 'always'],
'no-restricted-imports': [
Expand Down
1 change: 1 addition & 0 deletions .prettier-cache

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Join the [Ember community on Discord](https://discord.gg/zT3asNS)

## Contributing

- Open an Issue for discussion first if you're unsure a feature/fix is wanted.
- Branch off of `main` (default branch)
- Use descriptive branch names (e.g. `<type>/<short-description>`)
- PR against `main` (default branch).
- Open an Issue for discussion first if you're unsure a feature/fix is wanted.
- Branch off of `main` (default branch)
- Use descriptive branch names (e.g. `<type>/<short-description>`)
- PR against `main` (default branch).

## Thanks

Expand Down
2 changes: 1 addition & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"packages/*/dist",
"packages/*/tmp",
"packages/*/vendor",
".git",
".git"
]
}
21 changes: 8 additions & 13 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
{
"npmClient": "pnpm",
"useWorkspaces": true,
"packages": [
"packages/*"
],
"version": "3.0.0-alpha.0",
"command": {
"version": {
"allowBranch": [
"main",
"release"
]
}
"npmClient": "pnpm",
"useWorkspaces": true,
"packages": ["packages/*"],
"version": "3.0.0-alpha.0",
"command": {
"version": {
"allowBranch": ["main", "release"]
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"scripts": {
"lint": "pnpm run lint:prettier && pnpm run lint:js",
"lint:js": "eslint --cache --ext=js,ts .",
"lint:prettier": "prettier --check .",
"lint:prettier": "prettier --check --cache --cache-location=.prettier-cache --log-level=warn .",
"lint:prettier:fix": "prettier --write --cache --cache-location=.prettier-cache --log-level=warn .",
"test:development": "lerna run --stream --parallel --no-private test:development"
},
"packageManager": "pnpm@9.12.3",
Expand Down
3 changes: 1 addition & 2 deletions packages/flexi-config/lib/get-validated-flexi-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ function assert(statement, test) {

module.exports = function (projectRoot) {
if (
(['g', 'generate'].includes(process.argv[2]) &&
process.argv[3] === '@html-next/flexi-config') ||
(['g', 'generate'].includes(process.argv[2]) && process.argv[3] === '@html-next/flexi-config') ||
(process.argv[2] === 'install' && process.argv[3].includes('flexi'))
) {
// A flexi-config is currently being generated,
Expand Down
49 changes: 24 additions & 25 deletions packages/flexi-default-styles/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,69 @@
Changelog
=========
# Changelog

## v1.1.9

## v1.1.8

### Pull Requests

- [#53](https://github.com/runspired/flexi/pull/53) **feat**: exposes DSL for end users to create their own layout syntaxes *by [Chris Thoburn](https://github.com/runspired)*
- [#53](https://github.com/runspired/flexi/pull/53) **feat**: exposes DSL for end users to create their own layout syntaxes _by [Chris Thoburn](https://github.com/runspired)_

#### Commits

- [302ac7cd](https://github.com/runspired/flexi/commit/302ac7cd59437781f0db8e6e43d0b6c5fbd999fc) **fix(engines)**: enable flexi to better work in nested engines *by [Chris Thoburn](https://github.com/runspired)*
- [302ac7cd](https://github.com/runspired/flexi/commit/302ac7cd59437781f0db8e6e43d0b6c5fbd999fc) **fix(engines)**: enable flexi to better work in nested engines _by [Chris Thoburn](https://github.com/runspired)_

## v1.1.7

## v1.1.6

#### Commits

- [6ffecce3](https://github.com/runspired/flexi/commit/6ffecce3167a3cce793f218da01030779b937fa5) **fix(columnPrefix)**: correctly convert attributes to column classes *by [Chris Thoburn](https://github.com/runspired)*
- [6ffecce3](https://github.com/runspired/flexi/commit/6ffecce3167a3cce793f218da01030779b937fa5) **fix(columnPrefix)**: correctly convert attributes to column classes _by [Chris Thoburn](https://github.com/runspired)_

## v1.1.4

## v1.1.3

### Pull Requests

- [#35](https://github.com/runspired/flexi/pull/35) Release Changes *by [Chris Thoburn](https://github.com/runspired)*
- [#36](https://github.com/runspired/flexi/pull/36) **docs**: grammar and spelling fixes *by [koriroys/docs](https://github.com/koriroys/docs)*
- [#34](https://github.com/runspired/flexi/pull/34) **refactor**: more descriptive method name *by [koriroys/refactor](https://github.com/koriroys/refactor)*
- [#38](https://github.com/runspired/flexi/pull/38) 15 -> 5 secs per @runspired *by [Jay Phelps](https://github.com/jayphelps)*
- [#41](https://github.com/runspired/flexi/pull/41) Patch to fix Attribute Conversion *by [Chris Thoburn](https://github.com/runspired)*
- [#35](https://github.com/runspired/flexi/pull/35) Release Changes _by [Chris Thoburn](https://github.com/runspired)_
- [#36](https://github.com/runspired/flexi/pull/36) **docs**: grammar and spelling fixes _by [koriroys/docs](https://github.com/koriroys/docs)_
- [#34](https://github.com/runspired/flexi/pull/34) **refactor**: more descriptive method name _by [koriroys/refactor](https://github.com/koriroys/refactor)_
- [#38](https://github.com/runspired/flexi/pull/38) 15 -> 5 secs per @runspired _by [Jay Phelps](https://github.com/jayphelps)_
- [#41](https://github.com/runspired/flexi/pull/41) Patch to fix Attribute Conversion _by [Chris Thoburn](https://github.com/runspired)_

#### Commits

- [9d39e88b](https://github.com/runspired/flexi/commit/9d39e88bcda59cdc19c093cbfb5ca544e8d2d552) **fix(attribute-conversion)**: fixes issue #37 with parsing multiple attributes *by [Chris Thoburn](https://github.com/runspired)*
- [022884a9](https://github.com/runspired/flexi/commit/022884a9c2faa304cec123f88d023348d740223d) **fix(layout-service)**: spelling mistake *by [Kori Roys](https://github.com/koriroys)*
- [2f524a6a](https://github.com/runspired/flexi/commit/2f524a6aaf7e96218d2deb9aab916e4ce0140ece) **docs(readme)**: grammar and spelling fixes *by [Kori Roys](https://github.com/koriroys)*
- [b9acd6bb](https://github.com/runspired/flexi/commit/b9acd6bbb1a938d28b078f59b6888ffb44ad81cd) **fix(layout-service)**: prefer orientationIs to deviceIs/deviseIs - better naming *by [Kori Roys](https://github.com/koriroys)*
- [a1a70864](https://github.com/runspired/flexi/commit/a1a70864b53fe90d984fe01d8e5f953c819546ad) **refactor(layout-service)**: more descriptive method name *by [Kori Roys](https://github.com/koriroys)*
- [9d39e88b](https://github.com/runspired/flexi/commit/9d39e88bcda59cdc19c093cbfb5ca544e8d2d552) **fix(attribute-conversion)**: fixes issue #37 with parsing multiple attributes _by [Chris Thoburn](https://github.com/runspired)_
- [022884a9](https://github.com/runspired/flexi/commit/022884a9c2faa304cec123f88d023348d740223d) **fix(layout-service)**: spelling mistake _by [Kori Roys](https://github.com/koriroys)_
- [2f524a6a](https://github.com/runspired/flexi/commit/2f524a6aaf7e96218d2deb9aab916e4ce0140ece) **docs(readme)**: grammar and spelling fixes _by [Kori Roys](https://github.com/koriroys)_
- [b9acd6bb](https://github.com/runspired/flexi/commit/b9acd6bbb1a938d28b078f59b6888ffb44ad81cd) **fix(layout-service)**: prefer orientationIs to deviceIs/deviseIs - better naming _by [Kori Roys](https://github.com/koriroys)_
- [a1a70864](https://github.com/runspired/flexi/commit/a1a70864b53fe90d984fe01d8e5f953c819546ad) **refactor(layout-service)**: more descriptive method name _by [Kori Roys](https://github.com/koriroys)_

## v1.1.1

## v1.1.0

### Pull Requests

- [#22](https://github.com/runspired/flexi/pull/22) Faster initial sustain render *by [Chris Thoburn](https://github.com/runspired/feat)*
- [#27](https://github.com/runspired/flexi/pull/27) **feat**: implements labels and tests, resolves #16 *by [Chris Thoburn](https://github.com/runspired/feat)*
- [#28](https://github.com/runspired/flexi/pull/28) Adds documentation for labels and namespaces them *by [Chris Thoburn](https://github.com/runspired/feat)*
- [#29](https://github.com/runspired/flexi/pull/29) Feat/sustain hooks *by [Chris Thoburn](https://github.com/runspired/feat)*
- [#22](https://github.com/runspired/flexi/pull/22) Faster initial sustain render _by [Chris Thoburn](https://github.com/runspired/feat)_
- [#27](https://github.com/runspired/flexi/pull/27) **feat**: implements labels and tests, resolves #16 _by [Chris Thoburn](https://github.com/runspired/feat)_
- [#28](https://github.com/runspired/flexi/pull/28) Adds documentation for labels and namespaces them _by [Chris Thoburn](https://github.com/runspired/feat)_
- [#29](https://github.com/runspired/flexi/pull/29) Feat/sustain hooks _by [Chris Thoburn](https://github.com/runspired/feat)_

#### Commits

- [941b9be6](https://github.com/runspired/flexi/commit/941b9be629c3792da056232480781fac282f7869) **fix(tagless components)**: tagless components are now correctly handled *by [Chris Thoburn](https://github.com/runspired)*
- [74109e37](https://github.com/runspired/flexi/commit/74109e37d580496501ac1dfedfabde420116c993) **fix(mobile-first)**: ensure we always fall back to closest layout *by [Chris Thoburn](https://github.com/runspired)*
- [a4f4f7f1](https://github.com/runspired/flexi/commit/a4f4f7f1c49b441cdc768d3eed966c89ef78fa3a) **fix(layout-compile)**: improves efficiency of compiled templates, and resolves mobile-first issue *by [Chris Thoburn](https://github.com/runspired)*
- [941b9be6](https://github.com/runspired/flexi/commit/941b9be629c3792da056232480781fac282f7869) **fix(tagless components)**: tagless components are now correctly handled _by [Chris Thoburn](https://github.com/runspired)_
- [74109e37](https://github.com/runspired/flexi/commit/74109e37d580496501ac1dfedfabde420116c993) **fix(mobile-first)**: ensure we always fall back to closest layout _by [Chris Thoburn](https://github.com/runspired)_
- [a4f4f7f1](https://github.com/runspired/flexi/commit/a4f4f7f1c49b441cdc768d3eed966c89ef78fa3a) **fix(layout-compile)**: improves efficiency of compiled templates, and resolves mobile-first issue _by [Chris Thoburn](https://github.com/runspired)_

## v1.0.1

### Pull Requests

- [#19](https://github.com/runspired/flexi/pull/19) Fix layout path typo *by [Ilya Radchenko](https://github.com/knownasilya)*
- [#20](https://github.com/runspired/flexi/pull/20) Fixes leaky sustain movements *by [Chris Thoburn](https://github.com/runspired)*
- [#21](https://github.com/runspired/flexi/pull/21) set build branches to fix missing builds *by [Chris Thoburn](https://github.com/runspired)*
- [#19](https://github.com/runspired/flexi/pull/19) Fix layout path typo _by [Ilya Radchenko](https://github.com/knownasilya)_
- [#20](https://github.com/runspired/flexi/pull/20) Fixes leaky sustain movements _by [Chris Thoburn](https://github.com/runspired)_
- [#21](https://github.com/runspired/flexi/pull/21) set build branches to fix missing builds _by [Chris Thoburn](https://github.com/runspired)_

## 0.0.0

Expand Down
10 changes: 5 additions & 5 deletions packages/flexi-default-styles/addon/styles/addon.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import 'variables';
@import "variables";

@import 'mixins/index';
@import 'grid/grid';
@import 'helpers/index';
@import 'components/index';
@import "mixins/index";
@import "grid/grid";
@import "helpers/index";
@import "components/index";
38 changes: 18 additions & 20 deletions packages/flexi-default-styles/addon/styles/components/_index.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@import 'grid';
@import 'box';
@import 'centered';
@import 'hbox';
@import 'page';
@import 'screen';
@import 'vbox';
@import 'container';
@import 'fill';
@import "grid";
@import "box";
@import "centered";
@import "hbox";
@import "page";
@import "screen";
@import "vbox";
@import "container";
@import "fill";

$detected-elements: (
grid: true,
Expand All @@ -21,41 +21,39 @@ $detected-elements: (
);

@if ($include-css and $include-element-css) {

@if (map-get($detected-elements, 'grid')) {
@if (map-get($detected-elements, "grid")) {
@include gridElement();
}

@if (map-get($detected-elements, 'box')) {
@if (map-get($detected-elements, "box")) {
@include boxElement();
}

@if (map-get($detected-elements, 'centered')) {
@if (map-get($detected-elements, "centered")) {
@include centeredElement();
}

@if (map-get($detected-elements, 'hbox')) {
@if (map-get($detected-elements, "hbox")) {
@include hboxElement();
}

@if (map-get($detected-elements, 'page')) {
@if (map-get($detected-elements, "page")) {
@include pageElement();
}

@if (map-get($detected-elements, 'screen')) {
@if (map-get($detected-elements, "screen")) {
@include screenElement();
}

@if (map-get($detected-elements, 'vbox')) {
@if (map-get($detected-elements, "vbox")) {
@include vboxElement();
}

@if (map-get($detected-elements, 'container')) {
@if (map-get($detected-elements, "container")) {
@include containerElement();
}

@if (map-get($detected-elements, 'fill')) {
@if (map-get($detected-elements, "fill")) {
@include fillElement();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
@return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
}


@function pixel($num) {
@if unitless($num) {
@return $num * 1px;
Expand Down
4 changes: 2 additions & 2 deletions packages/flexi-default-styles/addon/styles/grid/_grid.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import 'functions';
@import 'mixins';
@import "functions";
@import "mixins";

@if ($include-css) {
@include make-columns($breakpoints, $column-prefix, $columns);
Expand Down
9 changes: 4 additions & 5 deletions packages/flexi-default-styles/addon/styles/grid/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

@mixin make-columns($breakpoints, $column-prefix, $columns) {
$breakpoint-counter: 0;
$col-prefix: '';
$col-prefix: "";
@if ($column-prefix) {
$col-prefix: '#{$column-prefix}-';
$col-prefix: "#{$column-prefix}-";
}

@each $name, $breakpoint-setup in $breakpoints {
Expand All @@ -44,7 +44,6 @@

// @media and @container breakpoints
@include breakpoint-up($name, $breakpoints) {

// responsive utilities
.hidden-#{$bp-prefix} {
display: none;
Expand Down Expand Up @@ -187,13 +186,13 @@
// It is currently recommended that you use a <box> sized to the offset
// you need.
@for $i from 0 through ($columns - 1) {
@if $breakpoint-counter != 1 or $i != 0 { // Avoid emitting useless .col-xs-offset-0
@if $breakpoint-counter != 1 or $i != 0 {
// Avoid emitting useless .col-xs-offset-0
.#{$col-prefix}offset-#{$bp-prefix}-#{$i} {
margin-left: percentage(math.div($i, $columns));
}
}
}

}
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import 'alignment';
@import "alignment";
12 changes: 6 additions & 6 deletions packages/flexi-default-styles/addon/styles/mixins/_flex.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// https://github.com/philipwalton/flexbugs

@mixin flex($values) {
@if $values == 'none' {
@if $values == "none" {
-webkit-box-flex: 0;
-moz-box-flex: 0;
-moz-box-flex: 0;
} @else {
-webkit-box-flex: nth($values, 1);
-moz-box-flex: nth($values, 1);
-moz-box-flex: nth($values, 1);
}
-webkit-flex: $values;
-ms-flex: $values;
flex: $values;
-webkit-flex: $values;
-ms-flex: $values;
flex: $values;
}

@mixin flexDisplay {
Expand Down
4 changes: 2 additions & 2 deletions packages/flexi-default-styles/addon/styles/mixins/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import 'element';
@import 'flex';
@import "element";
@import "flex";
Loading

0 comments on commit d7da0d0

Please sign in to comment.