Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Nov 1, 2024
1 parent afc309d commit 7c52a69
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ module.exports = {
requireConfigFile: false,
},
plugins: ['ember', 'qunit', 'simple-import-sort', 'import', 'unused-imports', 'unicorn', 'no-useless-assign'],
extends: ['eslint:recommended', 'prettier/prettier', 'plugin:ember/recommended', 'plugin:qunit/recommended', 'plugin:unicorn/recommended'],
extends: [
'eslint:recommended',
'prettier/prettier',
'plugin:ember/recommended',
'plugin:qunit/recommended',
'plugin:unicorn/recommended',
],
env: {
browser: true,
},
Expand Down
2 changes: 1 addition & 1 deletion .prettier-cache

Large diffs are not rendered by default.

12 changes: 3 additions & 9 deletions packages/flexi-dsl/dsl/template-precompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ function _convertGridColumns({ dsl }, breakpointPrefix, columns) {
return dsl.generateGridClass(breakpointPrefix, columns, dsl.columnPrefix, dsl.columns);
}

throw new Error(
`Flexi#attribute-conversion:: '${columns}' is not a valid column value for ${breakpointPrefix}.`
);
throw new Error(`Flexi#attribute-conversion:: '${columns}' is not a valid column value for ${breakpointPrefix}.`);
}

function _convertOffsetColumns({ dsl }, breakpointPrefix, value) {
Expand All @@ -47,9 +45,7 @@ function _convertOffsetColumns({ dsl }, breakpointPrefix, value) {
return dsl.generateOffsetClass(breakpointPrefix, offset, dsl.columnPrefix, dsl.columns);
}

throw new Error(
`Flexi#attribute-conversion:: '${offset}' is not a valid column offset for ${breakpointPrefix}.`
);
throw new Error(`Flexi#attribute-conversion:: '${offset}' is not a valid column offset for ${breakpointPrefix}.`);
}

function _convertAttribute({ dsl }, attributeNode) {
Expand All @@ -69,9 +65,7 @@ function _convertComplexAttribute({ dsl, utils }, attributeNode) {
const attributeValue = attributeNode.value.chars;

if (!validValues.includes(attributeValue)) {
throw new Error(
`Flexi#attribute-conversion:: '${attributeValue}' is not a valid value for ${attributeNode.name}.`
);
throw new Error(`Flexi#attribute-conversion:: '${attributeValue}' is not a valid value for ${attributeNode.name}.`);
}

return dsl.generateAttributeClass(attributeNode.name, attributeValue);
Expand Down

0 comments on commit 7c52a69

Please sign in to comment.