Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Non-Det Interpreter #1725

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

65 changes: 0 additions & 65 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
*.js
!eslint.config.js
!docs/jsdoc/templates/**/*.js
!docs/lib/**/*.js
*.map
Expand Down
75 changes: 75 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import tseslint from 'typescript-eslint'
import globals from 'globals'
import importPlugin from 'eslint-plugin-import'

/**
* @type {import('eslint').Linter.FlatConfig[]}
*/
export default [
leeyi45 marked this conversation as resolved.
Show resolved Hide resolved
{
// global ignores
ignores: ['dist', 'src/alt-langs', 'src/py-slang', 'src/__tests__/sicp', '**/*.snap']
},
...tseslint.configs.recommended,
{
files: ['**/*.ts*'],
languageOptions: {
globals: {
...globals.node,
...globals.es2016,
...globals.browser
},
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json'
}
},
plugins: {
'@typescript-eslint': tseslint.plugin,
import: importPlugin
},
rules: {
'import/no-duplicates': ['warn', { 'prefer-inline': true }],
'import/order': 'warn',
'@typescript-eslint/no-base-to-string': 'off', // TODO: Remove
'prefer-const': 'off', // TODO: Remove
'no-var': 'off', // TODO: Remove
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
'prefer-rest-params': 'off'
}
},
{
files: ['**/*.js', 'src/repl/*.ts'],
rules: {
'@typescript-eslint/no-require-imports': 'off'
}
}
]
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"scripts": {
"build": "yarn docs && yarn build:slang",
"build:slang": "tsc --project tsconfig.prod.json",
"eslint": "eslint --ext \".ts,.tsx\" src",
"eslint": "eslint src",
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
"format:ci": "prettier --list-different \"src/**/*.{ts,tsx}\"",
"test": "jest",
Expand All @@ -72,14 +72,12 @@
"@types/lodash": "^4.14.202",
"@types/node": "^20.0.0",
"@types/offscreencanvas": "^2019.7.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"ace-builds": "^1.4.12",
"coveralls": "^3.1.0",
"escodegen": "^2.0.0",
"eslint": "^8.57.0",
RichDom2185 marked this conversation as resolved.
Show resolved Hide resolved
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"globals": "^15.11.0",
"husky": "^8.0.1",
"jest": "^29.0.0",
"jest-environment-jsdom": "^29.0.0",
Expand All @@ -88,7 +86,8 @@
"jsdom": "^19.0.0",
"prettier": "^2.1.2",
"ts-jest": "^29.0.0",
"typescript": "^4.0.3"
"typescript": "^4.0.3",
"typescript-eslint": "^8.8.1"
},
"jest": {
"snapshotFormat": {
Expand Down
1 change: 0 additions & 1 deletion scripts/autocomplete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ targets = [
"source_2_lazy",
"source_3",
"source_3_concurrent",
"source_3_non-det",
"source_4",
"source_4_explicit-control"
"External libraries",
Expand Down
15 changes: 0 additions & 15 deletions scripts/jsdoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,6 @@ run() {
${LIB}/pairmutator.js \
${LIB}/concurrency.js

# Source §3 Non-Det

${JSDOC} -r -t ${TMPL} \
-c docs/jsdoc/conf.json \
-R ${MD}/README_3_NON-DET.md \
-d ${DST}/"source_3_non-det"/ \
${LIB}/auxiliary.js \
${LIB}/misc.js \
${LIB}/math.js \
${LIB}/list.js \
${LIB}/stream.js \
${LIB}/array.js \
${LIB}/pairmutator.js \
${LIB}/non-det.js

# Source §3 Typed

${JSDOC} -r -t ${TMPL} \
Expand Down
1 change: 0 additions & 1 deletion scripts/updateAutocompleteDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const TARGETS = [
"source_2_typed",
"source_3",
"source_3_concurrent",
"source_3_non-det",
"source_3_typed",
"source_4",
"source_4_typed",
Expand Down
Loading
Loading