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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# misc
/coverage/
/declarations/
!.*
.*/
.eslintcache
Expand Down
25 changes: 14 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,23 @@

module.exports = {
root : true,
parser : 'babel-eslint',
parser : '@typescript-eslint/parser',
parserOptions : {
ecmaVersion : 2018,
ecmaVersion : 'latest',
sourceType : 'module',
ecmaFeatures : {
legacyDecorators : true,
},
},
plugins : ['ember'],
plugins : ['ember', '@typescript-eslint'],
extends : [
'eslint:recommended',
'plugin:ember/recommended'
'plugin:ember/recommended',
'plugin:@typescript-eslint/recommended',
],
ignorePatterns : ['/dist/**'],
env : {
browser : true,
},
rules : {
'no-console' : ['error', { allow : ['warn', 'error'] }],
'no-debugger' : 'error',
'no-var' : 'off',
semi : ['error', 'always'],
indent : [1, 'tab'],
'space-before-function-paren' : [
Expand All @@ -42,6 +38,7 @@ module.exports = {
'no-nested-ternary' : 'error',
quotes : ['error', 'single'],
'arrow-parens' : ['error', 'always'],
'@typescript-eslint/no-explicit-any' : 'warn',
},
overrides : [
// node files
Expand All @@ -57,15 +54,21 @@ module.exports = {
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
parser : 'espree',
parserOptions : {
sourceType : 'script',
ecmaVersion : 'latest',
},
env : {
browser : false,
node : true,
},
plugins : ['node'],
extends : ['plugin:node/recommended'],
plugins : ['n'],
extends : ['plugin:n/recommended'],
rules : {
'@typescript-eslint/no-var-requires' : 'off',
'@typescript-eslint/no-require-imports' : 'off',
},
},
{
// test files
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- master
pull_request: {}

concurrency:
Expand All @@ -17,16 +16,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 20
cache: npm
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type Check
run: npm run lint:types
- name: Run Tests
run: npm run test:ember

Expand All @@ -35,10 +36,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 20
cache: npm
- name: Install Dependencies
run: npm install --no-shrinkwrap
Expand All @@ -54,21 +55,22 @@ jobs:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-5.8
- ember-lts-5.12
- ember-lts-6.4
- ember-lts-6.8
- ember-release
- ember-beta
- ember-canary
- ember-classic
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 20
cache: npm
- name: Install Dependencies
run: npm ci
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
/testem.log
/yarn-error.log

# typescript
/declarations/
*.tsbuildinfo

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
Expand Down
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
/yarn.lock
.gitkeep

# typescript
/tsconfig.json
*.tsbuildinfo
/declarations/
Comment on lines +34 to +37
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

/declarations/ is excluded from the npm package — type definitions won't be distributed to consumers.

tsconfig.json sets declarationDir: "declarations" to generate .d.ts files for package consumers, but this directory is also excluded from the npm publish via .npmignore. This means TypeScript users installing the package won't receive any type declarations.

For a v1 Ember addon, the standard approach is:

  1. Keep noEmit: true in the main tsconfig.json (for IDE/type-checking).
  2. Add a separate tsconfig.declarations.json that extends the main config, overrides noEmit: false, and runs as a prepack script.
  3. Only ignore /declarations/ from .gitignore, not .npmignore, so .d.ts files are included in the published package.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.npmignore around lines 34 - 37, Remove /declarations/ from .npmignore so
generated .d.ts files are published, add a tsconfig.declarations.json that
extends tsconfig.json with noEmit: false (overriding noEmit: true) to emit
declaration files into the declarations directory, and add a prepack script in
package.json to run tsc -p tsconfig.declarations.json before publishing; keep
/declarations/ in .gitignore only so declarations aren't checked into git but
are included in npm packages.


# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
Expand Down
184 changes: 0 additions & 184 deletions addon/components/tawk-messenger.js

This file was deleted.

Loading
Loading