Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }]],
},
},
// Disabling hbs plugin until https://github.com/ember-template-lint/eslint-plugin-hbs/issues/42 is resolved
Expand Down Expand Up @@ -41,6 +42,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand All @@ -60,8 +62,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
{
files: ['node-tests/**/*.js'],
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
module.exports = {
singleQuote: true,
printWidth: 120,
trailingComma: 'es5',
};
12 changes: 12 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/

# not linted here
/docs/
/vendor/
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
4 changes: 2 additions & 2 deletions addon/components/bs-form/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ export default class FormElement extends FormGroup {
return this.hasErrors || this.hasCustomError
? 'error'
: this.hasWarnings || this.hasCustomWarning
? 'warning'
: 'success';
? 'warning'
: 'success';
} else {
/* If there are custom errors or warnings these should always be shown */
return this.hasCustomError ? 'error' : 'warning';
Expand Down
13 changes: 13 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
const { maybeEmbroider } = require('@embroider/test-setup');
const webpack = require('webpack');

module.exports = function (defaults) {
let trees = {};
Expand Down Expand Up @@ -60,6 +61,18 @@ module.exports = function (defaults) {
packagerOptions: {
webpackConfig: {
devtool: false,
resolve: {
// sinon imports node's util, which webpack 5 no longer polyfills
fallback: {
util: require.resolve('util/'),
},
},
plugins: [
// util reads process.env.NODE_DEBUG when it loads, and there's no process in the browser
new webpack.DefinePlugin({
'process.env.NODE_DEBUG': false,
}),
],
},
},
});
Expand Down
56 changes: 30 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@
"build": "ember build --environment=production",
"docs:build": "yarn --cwd docs docs:build",
"docs:serve": "yarn --cwd docs docs:serve",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"nodetest": "mocha node-tests --recursive",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
Expand All @@ -51,9 +53,7 @@
"testem": "~3.18.0",
"@embroider/addon-shim": "1.10.2",
"pkg-entry-points": "1.1.1",
"ember-qunit/ember-auto-import": "^2.10.0",
"ember-a11y-testing/ember-auto-import": "^2.10.0",
"**/ember-try-config/ember-source-channel-url": "^3.0.0",
"@babel/plugin-transform-modules-systemjs": "^7.29.4",
"browserslist": "^4.28.7",
"tmp": "^0.2.7",
Expand Down Expand Up @@ -105,61 +105,65 @@
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"@babel/eslint-parser": "^7.22.15",
"@babel/plugin-proposal-decorators": "^7.23.2",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@embroider/test-setup": "^0.48.1",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"@ember/test-helpers": "^2.9.6",
"@embroider/test-setup": "^3.0.2",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"bootstrap": "^4.6.0",
"bootstrap-sass": "^3.3.7",
"broccoli-asset-rev": "^3.0.0",
"chai": "^4.3.4",
"chai-things": "^0.2.0",
"concurrently": "^8.2.2",
"ember-a11y-testing": "^4.0.7",
"ember-cli": "~3.28.6",
"ember-cli-app-version": "^4.0.0",
"ember-cli-blueprint-test-helpers": "^0.19.1",
"ember-cli-browserstack": "^1.1.0",
"ember-cli-content-security-policy": "^2.0.0-4",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-fastboot": "^4.1.1",
"ember-cli-fastboot-testing": "0.6.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-cli-test-loader": "^3.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-load-initializers": "^2.1.2",
"ember-modifier": "^3.2.7",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-page-title": "^8.0.0",
"ember-qunit": "^6.2.0",
"ember-resolver": "^8.1.0",
"ember-sinon": "^5.0.0",
"ember-sinon-qunit": "^5.0.0",
"ember-source": "~4.8.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"ember-try": "^3.0.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ember": "^11.11.1",
"eslint-plugin-hbs": "^1.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-qunit": "^6.2.0",
"glob": "^7.1.7",
"husky": "^4.3.8",
"jquery": "^3.7.1",
"lint-staged": "^11.0.0",
"loader.js": "^4.7.0",
"mocha": "^8.4.0",
"npm-run-all": "^4.1.5",
"popper.js": "^1.6.1",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.6.0",
"webpack": "^5.56.1"
"prettier": "^3.0.3",
"qunit": "^2.20.0",
"qunit-dom": "^2.0.0",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.0.2",
"util": "^0.12.5",
"webpack": "^5.89.0"
},
"peerDependencies": {
"@glimmer/component": "^1.0.4 || ^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions tests/dummy/app/styles/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */
5 changes: 1 addition & 4 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ module.exports = function (environment) {
rootURL: '/',
locationType: 'history',
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
},

APP: {
Expand Down
Loading
Loading