Skip to content

Commit

Permalink
BREAKING CHANGE: Drop CJS support, switch to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Sep 8, 2023
1 parent 820ac39 commit e1e499e
Show file tree
Hide file tree
Showing 33 changed files with 944 additions and 4,039 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.cjs
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: {
node: true,
},

parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
ignorePatterns: ['dist/**/*'],

rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'no-empty': 'off',
},
};
53 changes: 0 additions & 53 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
@@ -1,6 +1,6 @@
### If you have an issue with a specific extension or type

Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right?
Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right?

- [ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new).
- [ ] Yes: Go ahead and submit your issue/PR here and I'll look into it.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,6 @@
### If you have an issue with a specific extension or type

Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right?
Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right?

- [ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new).
- [ ] Yes: Go ahead and submit your issue/PR here and I'll look into it.
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
@@ -1,23 +1,21 @@
name: Mime CI

on:
[push]
on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
node-version: [14.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
.DS_Store
node_modules
package-lock.json
dist
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
18
6 changes: 6 additions & 0 deletions .prettierrc
@@ -0,0 +1,6 @@
{
"bracketSpacing": true,
"printWidth": 80,
"semi": true,
"singleQuote": true
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,6 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
}

0 comments on commit e1e499e

Please sign in to comment.