-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create version 1.0.0 for public release (#2)
This commit contains all of the features and tests for the initial public release of Structured Elements. It has been bundled into a single commit on 'main' for the sake of tidiness. We intend to use pull requests for all changes, so it seems reasonable to start with one. For a more detailed breakdown of the features included in this version, take a look at `README.md` or browse the code from this commit. The main index file from `src/index.ts` might be a helpful place to start.
- Loading branch information
Showing
135 changed files
with
1,561,188 additions
and
1 deletion.
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 @@ | ||
node_modules/ |
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,65 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
`eslint:recommended`, | ||
`plugin:@typescript-eslint/recommended`, | ||
`prettier`, | ||
], | ||
parser: `@typescript-eslint/parser`, | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: `module`, | ||
}, | ||
plugins: [`@typescript-eslint`, `simple-import-sort`, `unused-imports`], | ||
rules: { | ||
"no-dupe-class-members": `error`, | ||
curly: [`error`, `all`], | ||
"arrow-body-style": [`error`, `always`], | ||
"no-unused-vars": `off`, | ||
"no-console": `off`, | ||
"@typescript-eslint/consistent-type-imports": `error`, | ||
"@typescript-eslint/explicit-module-boundary-types": `off`, | ||
"@typescript-eslint/no-namespace": `off`, | ||
"@typescript-eslint/no-empty-function": `off`, | ||
"@typescript-eslint/no-unused-vars": `off`, | ||
"@typescript-eslint/quotes": [`error`, `backtick`], | ||
"@typescript-eslint/prefer-literal-enum-member": `error`, | ||
"unused-imports/no-unused-imports": `error`, | ||
"unused-imports/no-unused-vars": [ | ||
`off`, | ||
{ | ||
vars: `all`, | ||
varsIgnorePattern: `^_`, | ||
args: `after-used`, | ||
argsIgnorePattern: `^_`, | ||
}, | ||
], | ||
"simple-import-sort/exports": `error`, | ||
"simple-import-sort/imports": [ | ||
`error`, | ||
{ | ||
groups: [ | ||
// ext library & side effect imports | ||
[`^.+\\.s?css$`], | ||
[`^@/`], | ||
[ | ||
`^\\./?$`, | ||
`^\\.(?!/?$)`, | ||
`^\\.\\./?$`, | ||
`^\\.\\.(?!/?$)`, | ||
`^\\.\\./\\.\\./?$`, | ||
`^\\.\\./\\.\\.(?!/?$)`, | ||
`^\\.\\./\\.\\./\\.\\./?$`, | ||
`^\\.\\./\\.\\./\\.\\.(?!/?$)`, | ||
], | ||
[`^@/types`], // other that didn't fit in | ||
[`^`], | ||
], | ||
}, | ||
], | ||
}, | ||
} |
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,73 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm install | ||
- run: npm run build | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CI: true | ||
NODE_ENV: test | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm install | ||
- run: npm run lint-check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CI: true | ||
NODE_ENV: test | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm install | ||
- run: npm run test |
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 @@ | ||
.DS_Store | ||
/dist | ||
node_modules |
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,8 @@ | ||
.eslintignore | ||
.eslintrc.js | ||
.github/ | ||
.prettierrc.js | ||
jest.config.ts | ||
test/ | ||
tsconfig.build.json | ||
tsconfig.json |
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,6 @@ | ||
module.exports = { | ||
semi: false, | ||
singleQuote: false, | ||
tabWidth: 2, | ||
trailingComma: `all`, | ||
} |
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 @@ | ||
Structured Elements is an Open Source project licensed under the terms of | ||
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html> | ||
for license text. |
Oops, something went wrong.