Skip to content

Commit

Permalink
chore: make linting work with gts files
Browse files Browse the repository at this point in the history
  • Loading branch information
josemarluedke committed Jul 31, 2023
1 parent 970f046 commit 6bc8e75
Show file tree
Hide file tree
Showing 9 changed files with 159 additions and 151 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/node_modules/
/packages/*/bower_components/
/packages/*/node_modules/
/packages/*/declarations/
/site/node_modules/
/test-app/node_modules/
/site/lib/docfy-theme/node_modules/
Expand Down
5 changes: 0 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
const { join } = require('path');

module.exports = {
root: true,
parserOptions: {
project: join(__dirname, './tsconfig.eslint.json')
},
plugins: [],
extends: ['@underline/eslint-config-ember-typescript'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
{
files: '*.{js,ts,gjs,gts}',
options: {
singleQuote: true
templateSingleQuote: false
}
}
]
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
"@embroider/test-setup": "^3.0.1"
},
"devDependencies": {
"@underline/eslint-config-ember-typescript": "^0.13.0",
"@underline/eslint-config-node": "^0.13.0",
"@glint/core": "1.0.2",
"@glint/environment-ember-loose": "1.0.2",
"@glint/environment-ember-template-imports": "1.0.2",
"@underline/eslint-config-ember-typescript": "^0.14.3",
"@underline/eslint-config-node": "^0.14.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^5.11.1",
"eslint": "^8.46.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/core/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module.exports = {
presets: [["@babel/preset-typescript", {onlyRemoveTypeImports: true}]],
presets: [['@babel/preset-typescript', { onlyRemoveTypeImports: true }]],
plugins: [
"@embroider/addon-dev/template-colocation-plugin",
'@embroider/addon-dev/template-colocation-plugin',
[
'babel-plugin-ember-template-compilation',
{
targetFormat: 'hbs',
compilerPath: 'ember-source/dist/ember-template-compiler',
compilerPath: 'ember-source/dist/ember-template-compiler'
}
],
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-class-static-block",
['@babel/plugin-proposal-decorators', { legacy: true }],
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-class-static-block'
]
}
};
18 changes: 11 additions & 7 deletions packages/core/src/components/close-button.gts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Component from '@glimmer/component';
import { action } from '@ember/object';
import 'focus-visible/dist/focus-visible.js';
import { on } from '@ember/modifier';
import useFrontileClass from '../helpers/use-frontile-class.ts'
import VisuallyHidden from './visually-hidden.ts'
import useFrontileClass from '../helpers/use-frontile-class.ts';
import VisuallyHidden from './visually-hidden.ts';

export interface CloseButtonArgs {
/**
Expand Down Expand Up @@ -45,17 +45,21 @@ export default class CloseButton extends Component<CloseButtonSignature> {
this.args.onClick(event);
}
}

<template>
<button
type="button"
class={{useFrontileClass "close-button" (if @size @size "md") class=@class}}
type="button"
class={{useFrontileClass
"close-button"
(if @size @size "md")
class=@class
}}
...attributes
{{on "click" this.handleClick}}
>
{{#let
(useFrontileClass
"close-button" (if @size @size "md") part="icon"
) as |iconClassName|
(useFrontileClass "close-button" (if @size @size "md") part="icon")
as |iconClassName|
}}
{{#if (has-block)}}
{{yield iconClassName}}
Expand Down
2 changes: 1 addition & 1 deletion test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"ember-try": "^2.0.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.6.0",
"prettier": "^3.0.0",
"qunit": "^2.19.4",
"qunit-dom": "^2.0.0",
"sinon": "^15.2.0",
Expand Down
5 changes: 0 additions & 5 deletions tsconfig.eslint.json

This file was deleted.

Loading

0 comments on commit 6bc8e75

Please sign in to comment.