Commit 25e43a5d authored by Florian Müllner's avatar Florian Müllner

lint: Remove legacy configuration

After the last batch of indentation changes, the whole code base
conforms to the new style now, so we can drop the legacy eslint
configuration.

!66
parent ad914441
Pipeline #83526 passed with stages
in 49 seconds
...@@ -24,7 +24,7 @@ eslint: ...@@ -24,7 +24,7 @@ eslint:
image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v1 image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v1
stage: source_check stage: source_check
script: script:
- sh lint/generate-report.sh -o $LINT_LOG || { cat $LINT_LOG; false; } - eslint -o $LINT_LOG --no-color || { cat $LINT_LOG; false; }
<<: *only_default <<: *only_default
artifacts: artifacts:
paths: paths:
......
{
"rules": {
"indent": [
"error",
4,
{
"ignoredNodes": [
"CallExpression > ArrowFunctionExpression",
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
],
"CallExpression": { "arguments": "first" },
"MemberExpression": "off"
}
]
}
}
#!/bin/sh
SEP=`printf '\t'`
OUTPUT=/dev/stderr
CWD=`pwd`
SRCDIR=`dirname $0`
run_lint() {
eslint -f unix "$@" .
}
parse_opts() {
tmp=`getopt -l output: o: "$@"`
[ $? -ne 0 ] && exit 1
eval set -- $tmp
while true
do
case $1 in
--output|-o)
OUTPUT=`realpath $2`; shift 2; continue ;;
--)
shift; break ;;
esac
done
}
# delete lines that don't start with '/',
# replace the first space with tab, sort
process_for_join() {
sed -E "/\//!d; s|(\S+)\s|\1$SEP|" | sort -k 1b,1
}
# re-replace tab with space
process_post_join() {
sed -E "s|$SEP| |"
}
create_report() {
tmp1=`mktemp --tmpdir lint-XXXX`
run_lint | process_for_join > $tmp1
tmp2=`mktemp --tmpdir lint-XXXX`
run_lint -c lint/eslintrc-legacy.json | process_for_join > $tmp2
join -t"$SEP" -o '0,1.2' $tmp1 $tmp2 | process_post_join
rm $tmp1 $tmp2
}
parse_opts "$@"
cd $SRCDIR/..
create_report | tee $OUTPUT | grep -q .
rv=$(( $? == 0 ))
cd $CWD
[ $rv -eq 0 -a -f $OUTPUT ] && rm $OUTPUT
exit $rv
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment