Skip to content

Commit

Permalink
Merge pull request #5 from spacedriveapp/update-deps
Browse files Browse the repository at this point in the history
Version 1.7.1
  • Loading branch information
HeavenVolkoff authored Sep 18, 2024
2 parents 39b5b38 + 5fd7aa7 commit 4e594fe
Show file tree
Hide file tree
Showing 25 changed files with 1,685 additions and 2,461 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ indent_style = space
indent_size = 2

# Kotlin
# https://android.github.io/kotlin-guides/style.html#indentation
# https://kotlinlang.org/docs/coding-conventions.html#indentation
[*.{kt,kts}]
indent_size = 4
indent_style = space
Expand Down
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ on:
branches:
- main
pull_request:
paths-ignore:
- '**/README.md'
- '**/LICENSE.md'
- '**/.*'
- docs/**

# Cancel previous runs of the same workflow on the same branch.
concurrency:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,3 @@ $RECYCLE.BIN/
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/Node,Windows,Linux,macOS,VisualStudioCode,C

package.json.backup
5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"explorer.fileNesting.patterns": {
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
"*.mjs": "${capture}.mjs.map, ${capture}.min.mjs, ${capture}.d.mts",
"*.cjs": "${capture}.cjs.map, ${capture}.min.cjs, ${capture}.d.cts",
".npmrc": ".nvmrc, .yarnrc.yml",
".gitignore": ".eslintignore, .prettierignore",
"README.md": "CONTRIBUTING.md, CODE_OF_CONDUCT.md",
"LICENSE.md": "PREAMBLE",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, pnpm-workspace.yaml, .pnp.cjs, .pnp.loader.mjs, .eslintcache",
"tsconfig.json": "tsconfig.*.json"
}
},
"cSpell.words": ["ENULL", "Hardlink", "Spacedrive"]
}
11 changes: 11 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": ["@babel/plugin-syntax-import-attributes", "@babel/plugin-proposal-json-modules"],
"presets": [
[
"@babel/preset-env",
{
"shippedProposals": true
}
]
]
}
2 changes: 1 addition & 1 deletion docs/archive-wasm/functions/extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **extract**(`data`, `opts`?): `Generator`\<[`Entry`](../interfaces/Entry.md), `void`, `void`\>
Uncompress archive and iterate through all it's entries
Extract archive and iterate through all it's entries

## Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/archive-wasm/functions/extractAll.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **extractAll**(`data`, `opts`?): [`Entry`](../interfaces/Entry.md)[]
Uncompress all entries in an archive
Extract all entries in an archive

> This function is the preferred choice over `extract` when your use case
> involves accessing the content data of all entries within the archive,
Expand Down
2 changes: 1 addition & 1 deletion docs/archive-wasm/interfaces/ExtractOpts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

> **encoding**: `undefined` \| `string`
Encoding to be used to parse entry's metada. Defaults to 'utf8'
Encoding to be used to parse entry's metadata. Defaults to 'utf8'

---

Expand Down
4 changes: 2 additions & 2 deletions eslint-local-rules.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

'use strict'

module.exports = {
module.exports = /** @type { Record<string, import('eslint').Rule.RuleModule> } */ ({
'disallow-jsdoc-typedef': {
meta: {
type: 'problem',
Expand Down Expand Up @@ -48,4 +48,4 @@ module.exports = {
}
},
},
}
})
158 changes: 158 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
/*!
* archive-wasm - LibArchive compiled to WASM with a idiomatic JS API
* Copyright (C) 2023 Spacedrive Technology Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import babelParser from '@babel/eslint-parser'
import babel from '@babel/eslint-plugin'
import jsdoc from 'eslint-plugin-jsdoc'
import licenseHeader from 'eslint-plugin-license-header'
import localRules from 'eslint-plugin-local-rules'
import prettier from 'eslint-plugin-prettier/recommended'
import globals from 'globals'
import neostandard, { plugins, resolveIgnoresFromGitignore } from 'neostandard'

/** @type { import('eslint').Linter.Config[] } */
export default [
...neostandard({
ts: true,
noStyle: true,
ignores: [...resolveIgnoresFromGitignore(), 'src/wasm/libarchive.mjs'],
}),
{
plugins: { localRules, licenseHeader },
rules: {
'licenseHeader/header': ['error', 'PREAMBLE'],
},
},
plugins.n.configs['flat/recommended-module'],
{
files: ['**/*.js', '**/*.mjs'],
plugins: { babel },
languageOptions: {
parser: babelParser,
parserOptions: {
requireConfigFile: false,
},
},
},
{
...plugins.n.configs['flat/recommended-script'],
files: ['**/*.cjs'],
},
plugins.promise.configs['flat/recommended'],
{
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
...jsdoc.configs['flat/recommended-typescript-flavor'],
rules: {
...jsdoc.configs['flat/recommended-typescript-flavor'].rules,
'jsdoc/require-returns-check': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns-description': 'off',
},
},
...[
...plugins['typescript-eslint'].configs.strictTypeChecked,
...plugins['typescript-eslint'].configs.stylisticTypeChecked,
].map(conf => ({
...conf,
files: ['**/*.ts', '**/*.d.ts', '**/*.d.mts', '**/*.d.cts'],
languageOptions: {
...(conf.languageOptions ?? {}),
parserOptions: {
...(conf.parserOptions ?? {}),
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
})),
{
files: ['**/*.ts', '**/*.d.ts', '**/*.d.mts', '**/*.d.cts'],
rules: {
'n/no-unpublished-import': [
'error',
{
ignoreTypeImport: true,
},
],
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/unbound-method': [
'error',
{
ignoreStatic: true,
},
],
'@typescript-eslint/no-explicit-any': [
'error',
{
fixToUnknown: true,
},
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{
ignoreTypeReferences: true,
},
],
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
},
],
},
},
{
files: ['*.d.ts', '**/*.d.mts'],
rules: {
'localRules/disallow-jsdoc-typedef': 'error',
'@typescript-eslint/no-unused-vars': 'off',
},
},
{
files: ['src/wasm/libarchive.mjs', 'src/wasm/libarchive.d.mts'],
rules: {
'licenseHeader/header': 'off',
'padding-line-between-statements': [
'error',
{
blankLine: 'always',
prev: '*',
next: 'export',
},
],
},
},
{
files: ['src/**/*.mjs'],
ignores: ['src/fs.mjs', 'src/wasm/libarchive.mjs'],
languageOptions: {
globals: {
...globals['shared-node-browser'],
...globals.es2022,
},
},
},
{
files: ['**/*'],
rules: {
'no-void': ['error', { allowAsStatement: true }],
'n/no-missing-import': 'off',
},
},
prettier,
]
Loading

0 comments on commit 4e594fe

Please sign in to comment.