Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
107 changes: 51 additions & 56 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,53 @@
{
"name": "Jupyter UI",
"build": {
"dockerfile": "Dockerfile",
"context": "../",
"target": "dev"
},
"remoteUser": "mambauser",
"postStartCommand": "yarn install",
"hostRequirements": {
"memory": "2gb",
"cpus": 2
},
"portsAttributes": {
"8686": {
"label": "Jupyter Server",
"onAutoForward": "notify"
},
"3208": {
"label": "Webpack Application",
"onAutoForward": "notify"
},
"3000": {
"label": "CRA, Docusaurus, Next.js... ",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.languageServer": "Default",
"pylinting.enabled": true,
"pylinting.pylintEnabled": true,
"autopep8.path": [
"/usr/local/py-utils/bin/autopep8"
],
"autopep8.blackPath": "/usr/local/py-utils/bin/black",
"autopep8.yapfPath": "/usr/local/py-utils/bin/yapf",
"pylinting.banditPath": "/usr/local/py-utils/bin/bandit",
"pylinting.flake8Path": "/usr/local/py-utils/bin/flake8",
"pylinting.mypyPath": "/usr/local/py-utils/bin/mypy",
"pylinting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"pylinting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"pylinting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
}
"name": "Jupyter UI",
"build": {
"dockerfile": "Dockerfile",
"context": "../",
"target": "dev"
},
"remoteUser": "mambauser",
"postStartCommand": "yarn install",
"hostRequirements": {
"memory": "2gb",
"cpus": 2
},
"portsAttributes": {
"8686": {
"label": "Jupyter Server",
"onAutoForward": "notify"
},
"3208": {
"label": "Webpack Application",
"onAutoForward": "notify"
},
"3000": {
"label": "CRA, Docusaurus, Next.js... ",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.languageServer": "Default",
"pylinting.enabled": true,
"pylinting.pylintEnabled": true,
"autopep8.path": ["/usr/local/py-utils/bin/autopep8"],
"autopep8.blackPath": "/usr/local/py-utils/bin/black",
"autopep8.yapfPath": "/usr/local/py-utils/bin/yapf",
"pylinting.banditPath": "/usr/local/py-utils/bin/bandit",
"pylinting.flake8Path": "/usr/local/py-utils/bin/flake8",
"pylinting.mypyPath": "/usr/local/py-utils/bin/mypy",
"pylinting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"pylinting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"pylinting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
"extensions": ["ms-python.python", "ms-python.vscode-pylance"]
}
}
}
54 changes: 54 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# TypeScript, JavaScript, JSX, TSX files
[*.{ts,tsx,js,jsx}]
indent_style = space
indent_size = 2

# JSON files
[*.json]
indent_style = space
indent_size = 2

# YAML files
[*.{yml,yaml}]
indent_style = space
indent_size = 2

# Markdown files
[*.{md,mdx}]
trim_trailing_whitespace = false

# Python files
[*.py]
indent_style = space
indent_size = 4

# Makefile
[Makefile]
indent_style = tab

# Package files
[package.json]
indent_style = space
indent_size = 2

# CSS files
[*.css]
indent_style = space
indent_size = 2

# HTML files
[*.html]
indent_style = space
indent_size = 2
94 changes: 94 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
env: {
browser: true,
es2020: true,
node: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended', // This must be last
],
plugins: ['@typescript-eslint', 'react', 'react-hooks', 'prettier'],
rules: {
// TypeScript specific rules
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-non-null-assertion': 'warn',

// React specific rules
'react/react-in-jsx-scope': 'off', // Not needed with React 17+
'react/prop-types': 'off', // We use TypeScript for type checking
'react/display-name': 'off',
'react/no-unescaped-entities': 'warn',

// General rules
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-debugger': 'warn',
'prefer-const': 'warn',
'no-var': 'error',

// Prettier integration
'prettier/prettier': 'warn',
},
overrides: [
{
// Test files
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'],
env: {
jest: true,
},
},
{
// JavaScript files
files: ['**/*.js', '**/*.jsx'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
// Storybook files
files: ['**/*.stories.tsx', '**/*.stories.ts'],
rules: {
'import/no-anonymous-default-export': 'off',
},
},
],
ignorePatterns: [
'node_modules/',
'dist/',
'build/',
'lib/',
'*.min.js',
'coverage/',
'.next/',
'storybook-static/',
],
};
Loading
Loading