Merge pull request #202 from 67P/chore/fix_js_linting
Fix ESLint setup
This commit was merged in pull request #202.
This commit is contained in:
+18
-4
@@ -2,13 +2,21 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
parser: 'babel-eslint',
|
parser: '@babel/eslint-parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 2018,
|
requireConfigFile: false,
|
||||||
|
ecmaVersion: 2020,
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
legacyDecorators: true
|
legacyDecorators: true
|
||||||
}
|
},
|
||||||
|
babelOptions: {
|
||||||
|
babelrc: false,
|
||||||
|
configFile: false,
|
||||||
|
plugins: [
|
||||||
|
['@babel/plugin-proposal-decorators', { legacy: true }],
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
globals: {
|
globals: {
|
||||||
console: true
|
console: true
|
||||||
@@ -28,7 +36,13 @@ module.exports = {
|
|||||||
'no-console': 'off',
|
'no-console': 'off',
|
||||||
'ember/no-jquery': 'error',
|
'ember/no-jquery': 'error',
|
||||||
'ember/require-computed-property-dependencies': 'warn',
|
'ember/require-computed-property-dependencies': 'warn',
|
||||||
'ember/no-observers': 'warn'
|
'ember/no-computed-properties-in-native-classes': 'warn',
|
||||||
|
'ember/no-observers': 'warn',
|
||||||
|
'ember/no-classic-classes': 'warn',
|
||||||
|
'ember/no-classic-components': 'warn',
|
||||||
|
'ember/no-controller-access-in-routes': 'warn',
|
||||||
|
'ember/no-actions-hash': 'warn',
|
||||||
|
'ember/require-tagless-components': 'warn'
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
// node files
|
// node files
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Component from '@ember/component';
|
import Component from '@ember/component';
|
||||||
import { computed } from '@ember/object';
|
import { computed } from '@ember/object';
|
||||||
import { alias, and, notEmpty } from '@ember/object/computed';
|
import { and, notEmpty } from '@ember/object/computed';
|
||||||
import { assign } from '@ember/polyfills';
|
import { assign } from '@ember/polyfills';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
// Code from https://github.com/HeroicEric/ember-group-by (MIT licensed)
|
// Code from https://github.com/HeroicEric/ember-group-by (MIT licensed)
|
||||||
//
|
//
|
||||||
import { A } from '@ember/array';
|
import { A } from '@ember/array';
|
||||||
import { get } from '@ember/object';
|
|
||||||
import { isPresent } from '@ember/utils';
|
import { isPresent } from '@ember/utils';
|
||||||
|
|
||||||
export default function groupBy (collection, property) {
|
export default function groupBy (collection, property) {
|
||||||
@@ -11,11 +10,11 @@ export default function groupBy (collection, property) {
|
|||||||
|
|
||||||
if (items) {
|
if (items) {
|
||||||
items.forEach(function(item) {
|
items.forEach(function(item) {
|
||||||
let value = get(item, property);
|
let value = item[property];
|
||||||
let group = groups.findBy('value', value);
|
let group = groups.findBy('value', value);
|
||||||
|
|
||||||
if (isPresent(group)) {
|
if (isPresent(group)) {
|
||||||
get(group, 'items').push(item);
|
group.items.push(item);
|
||||||
} else {
|
} else {
|
||||||
group = { property: property, value: value, items: [item] };
|
group = { property: property, value: value, items: [item] };
|
||||||
groups.push(group);
|
groups.push(group);
|
||||||
|
|||||||
Generated
+403
-282
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -26,10 +26,11 @@
|
|||||||
"deploy": "git push 5apps master"
|
"deploy": "git push 5apps master"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/eslint-parser": "^7.19.1",
|
||||||
|
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||||
"@ember/optional-features": "^1.3.0",
|
"@ember/optional-features": "^1.3.0",
|
||||||
"@glimmer/component": "^1.0.0",
|
"@glimmer/component": "^1.0.0",
|
||||||
"@glimmer/tracking": "^1.0.0",
|
"@glimmer/tracking": "^1.0.0",
|
||||||
"babel-eslint": "^10.1.0",
|
|
||||||
"babel-preset-es2015": "^6.22.0",
|
"babel-preset-es2015": "^6.22.0",
|
||||||
"broccoli-asset-rev": "^3.0.0",
|
"broccoli-asset-rev": "^3.0.0",
|
||||||
"ember-auto-import": "^1.12.1",
|
"ember-auto-import": "^1.12.1",
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
"ember-template-lint": "^2.8.0",
|
"ember-template-lint": "^2.8.0",
|
||||||
"ember-truth-helpers": "^3.0.0",
|
"ember-truth-helpers": "^3.0.0",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.14.0",
|
||||||
"eslint-plugin-ember": "^10.6.0",
|
"eslint-plugin-ember": "^11.0.6",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"ethers": "^5.4.7",
|
"ethers": "^5.4.7",
|
||||||
"fetch-mock": "^9.10.7",
|
"fetch-mock": "^9.10.7",
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ module('Integration | Component | contribution-list', function(hooks) {
|
|||||||
let kredits = this.owner.lookup('service:kredits');
|
let kredits = this.owner.lookup('service:kredits');
|
||||||
kredits.set('contributors', contributors);
|
kredits.set('contributors', contributors);
|
||||||
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
this.set('fixtures', contributions);
|
this.set('fixtures', contributions);
|
||||||
await render(hbs`{{contribution-list contributions=fixtures showQuickFilter=true}}`);
|
await render(hbs`{{contribution-list contributions=fixtures showQuickFilter=true}}`);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user