-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEAD-13: add bundler + ts support (#6)
* app build: add webpack dep * app build: make module private * app build: change project structure * app build: add webpack config * app build: add build script * dist feat: run build * app build: add ts support * app build: add css loader * app build: add post-css loader * app build: change style regexp * app build: add babel * app build: webpack ref * app build: add eslint ignore * app build: add prettier ignore * app build: update .gitignore * app ref: rm ignored files * app build: fix webpack config * app build: add babel plugin for ts * app build: add title for webpack plugin * app build: add source map * app build: add style loader * app build: add sass loader * app build: remove src contents * app build: fix eslint ignore * app ci: disable legacy linter for ts * app build: update webpack options * app build: setup dev server * app build: ref entry path * app build: change npm start * app build: fix configs * app ci: remove super linter * app ci: add npm install * app ci: add node setup action * app ci: add npx to eslint call * app ci: add npm ci * app ci: update setup-node * app build: add hbs loader * app ref: delete example index.ts
- Loading branch information
Showing
13 changed files
with
10,084 additions
and
1,727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
esmodules: true, | ||
}, | ||
bugfixes: true, | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Browsers that we support | ||
|
||
defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,13 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Super-linter | ||
uses: super-linter/super-linter/[email protected] | ||
env: | ||
VALIDATE_JAVASCRIPT_STANDARD: false | ||
VALIDATE_JSON: false | ||
VALIDATE_CHECKOV: false | ||
LINTER_RULES_PATH: / | ||
JAVASCRIPT_ES_CONFIG_FILE: eslint.config.js | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install modules | ||
run: npm ci | ||
|
||
- name: Lint code | ||
run: npx eslint . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
|
||
# Node JS | ||
node_modules/ | ||
|
||
# Build | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
const prettier = require('eslint-plugin-prettier'); | ||
import prettier from 'eslint-plugin-prettier'; | ||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
module.exports = [ | ||
export default tseslint.config( | ||
{ | ||
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'], | ||
languageOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: 'module', | ||
}, | ||
ignores: ['node_modules/*', 'dist/*', '.babelrc.cjs', 'webpack.config.cjs'], | ||
}, | ||
{ | ||
files: ['**/*.{ts,js}'], | ||
plugins: { | ||
prettier, | ||
}, | ||
rules: { | ||
'prettier/prettier': 'error', | ||
semi: ['warn', 'always'], | ||
}, | ||
}, | ||
]; | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
...tseslint.configs.stylistic, | ||
); |
Oops, something went wrong.